1834dcf10SDeepak Kodihalli #include "remote_logging_tests.hpp" 2834dcf10SDeepak Kodihalli #include "xyz/openbmc_project/Common/error.hpp" 3834dcf10SDeepak Kodihalli 4834dcf10SDeepak Kodihalli namespace phosphor 5834dcf10SDeepak Kodihalli { 6834dcf10SDeepak Kodihalli namespace logging 7834dcf10SDeepak Kodihalli { 8834dcf10SDeepak Kodihalli namespace test 9834dcf10SDeepak Kodihalli { 10834dcf10SDeepak Kodihalli 11834dcf10SDeepak Kodihalli using namespace sdbusplus::xyz::openbmc_project::Common::Error; 12834dcf10SDeepak Kodihalli TEST_F(TestRemoteLogging,testGoodAddress)13834dcf10SDeepak KodihalliTEST_F(TestRemoteLogging, testGoodAddress) 14834dcf10SDeepak Kodihalli { 15834dcf10SDeepak Kodihalli config->address("1.1.1.1"); 16834dcf10SDeepak Kodihalli EXPECT_EQ(config->address(), "1.1.1.1"); 17*a1c4338eSLei YU 18*a1c4338eSLei YU config->address("abcd:ef01::01"); 19*a1c4338eSLei YU EXPECT_EQ(config->address(), "abcd:ef01::01"); 20834dcf10SDeepak Kodihalli } 21834dcf10SDeepak Kodihalli TEST_F(TestRemoteLogging,testBadAddress)22834dcf10SDeepak KodihalliTEST_F(TestRemoteLogging, testBadAddress) 23834dcf10SDeepak Kodihalli { 2427e9f131SAndrew Geissler EXPECT_THROW(config->address("this is not_an_IP!"), InvalidArgument); 25834dcf10SDeepak Kodihalli } 26834dcf10SDeepak Kodihalli 27834dcf10SDeepak Kodihalli } // namespace test 28834dcf10SDeepak Kodihalli } // namespace logging 29834dcf10SDeepak Kodihalli } // namespace phosphor 30