blob: 274ac7cf6b0a096921e94ef5ef884629565a3ac7 [file] [log] [blame]
#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");
config->address("abcd:ef01::01");
EXPECT_EQ(config->address(), "abcd:ef01::01");
}
TEST_F(TestRemoteLogging, testBadAddress)
{
EXPECT_THROW(config->address("this is not_an_IP!"), InvalidArgument);
}
} // namespace test
} // namespace logging
} // namespace phosphor