summaryrefslogtreecommitdiffstats
path: root/test/remote_logging_test_address.cpp
blob: 5c8794e000f1d676b37648e49fa0c9ed6b7c56c8 (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
#include "remote_logging_tests.hpp"
#include "xyz/openbmc_project/Common/error.hpp"

namespace phosphor
{
namespace logging
{
namespace test
{

using namespace sdbusplus::xyz::openbmc_project::Common::Error;

TEST_F(TestRemoteLogging, testGoodAddress)
{
    config->address("1.1.1.1");
    EXPECT_EQ(config->address(), "1.1.1.1");
}

TEST_F(TestRemoteLogging, testBadAddress)
{
    EXPECT_THROW(config->address("not_an_IP"), InvalidArgument);
}

} // namespace test
} // namespace logging
} // namespace phosphor
OpenPOWER on IntegriCloud