blob: 7831ce21e3a90442a16430cf703536972a09fd42 [file] [log] [blame]
Deepak Kodihalli707a3e12017-06-14 03:56:12 -05001#include "config.h"
2
Patrick Venturef18bf832018-10-26 18:14:00 -07003#include "log_manager.hpp"
4
5#include <stdlib.h>
6
7#include <experimental/filesystem>
8#include <sdbusplus/bus.hpp>
Matt Spinlerb181d9d2020-06-05 14:49:59 -05009#include <sdbusplus/test/sdbus_mock.hpp>
Patrick Venturef18bf832018-10-26 18:14:00 -070010
11#include <gtest/gtest.h>
12
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050013namespace phosphor
14{
15namespace logging
16{
17namespace test
18{
19
20namespace fs = std::experimental::filesystem;
21
22char tmplt[] = "/tmp/logging_test.XXXXXX";
Matt Spinlerb181d9d2020-06-05 14:49:59 -050023sdbusplus::SdBusMock sdbusMock;
24sdbusplus::bus::bus bus = sdbusplus::get_mocked_new(&sdbusMock);
Nagaraju Goruganti05aae8b2017-08-30 07:56:12 -050025phosphor::logging::internal::Manager manager(bus, OBJ_INTERNAL);
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050026
27class TestSerialization : public testing::Test
28{
Patrick Venturef18bf832018-10-26 18:14:00 -070029 public:
30 TestSerialization() : dir(fs::path(mkdtemp(tmplt)))
31 {
32 }
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050033
Patrick Venturef18bf832018-10-26 18:14:00 -070034 ~TestSerialization()
35 {
36 fs::remove_all(dir);
37 }
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050038
Patrick Venturef18bf832018-10-26 18:14:00 -070039 fs::path dir;
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050040};
41
42} // namespace test
43} // namespace logging
44} // namespace phosphor