summaryrefslogtreecommitdiffstats
path: root/test/serialization_tests.hpp
blob: a8054d3c6cf2604dccb2ab12025880d615baa635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <gtest/gtest.h>
#include <experimental/filesystem>
#include <stdlib.h>
#include <sdbusplus/bus.hpp>
#include "log_manager.hpp"
#include "config.h"

namespace phosphor
{
namespace logging
{
namespace test
{

namespace fs = std::experimental::filesystem;

char tmplt[] = "/tmp/logging_test.XXXXXX";
auto bus = sdbusplus::bus::new_default();
phosphor::logging::internal::Manager manager(bus, OBJ_INTERNAL);

class TestSerialization : public testing::Test
{
    public:
        TestSerialization() :
            dir(fs::path(mkdtemp(tmplt)))
        {
        }

        ~TestSerialization()
        {
            fs::remove_all(dir);
        }

        fs::path dir;
};

} // namespace test
} // namespace logging
} // namespace phosphor


OpenPOWER on IntegriCloud