blob: 274ac7cf6b0a096921e94ef5ef884629565a3ac7 [file] [log] [blame]
Deepak Kodihalli834dcf12018-08-30 05:05:46 -05001#include "remote_logging_tests.hpp"
2#include "xyz/openbmc_project/Common/error.hpp"
3
4namespace phosphor
5{
6namespace logging
7{
8namespace test
9{
10
11using namespace sdbusplus::xyz::openbmc_project::Common::Error;
12
13TEST_F(TestRemoteLogging, testGoodAddress)
14{
15 config->address("1.1.1.1");
16 EXPECT_EQ(config->address(), "1.1.1.1");
Lei YUa1c43382021-04-15 20:26:25 +080017
18 config->address("abcd:ef01::01");
19 EXPECT_EQ(config->address(), "abcd:ef01::01");
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050020}
21
22TEST_F(TestRemoteLogging, testBadAddress)
23{
Andrew Geissler27e9f132020-03-30 15:35:56 -050024 EXPECT_THROW(config->address("this is not_an_IP!"), InvalidArgument);
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050025}
26
Patrick Venturef18bf832018-10-26 18:14:00 -070027} // namespace test
28} // namespace logging
29} // namespace phosphor