1 #include "remote_logging_tests.hpp" 2 #include "xyz/openbmc_project/Common/error.hpp" 3 4 namespace phosphor 5 { 6 namespace logging 7 { 8 namespace test 9 { 10 11 using namespace sdbusplus::xyz::openbmc_project::Common::Error; 12 TEST_F(TestRemoteLogging,testGoodAddress)13TEST_F(TestRemoteLogging, testGoodAddress) 14 { 15 config->address("1.1.1.1"); 16 EXPECT_EQ(config->address(), "1.1.1.1"); 17 18 config->address("abcd:ef01::01"); 19 EXPECT_EQ(config->address(), "abcd:ef01::01"); 20 } 21 TEST_F(TestRemoteLogging,testBadAddress)22TEST_F(TestRemoteLogging, testBadAddress) 23 { 24 EXPECT_THROW(config->address("this is not_an_IP!"), InvalidArgument); 25 } 26 27 } // namespace test 28 } // namespace logging 29 } // namespace phosphor 30