diff options
Diffstat (limited to 'test/remote_logging_test_address.cpp')
-rw-r--r-- | test/remote_logging_test_address.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/remote_logging_test_address.cpp b/test/remote_logging_test_address.cpp new file mode 100644 index 0000000..1291a2e --- /dev/null +++ b/test/remote_logging_test_address.cpp @@ -0,0 +1,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 |