diff options
Diffstat (limited to 'test/remote_logging_test_config.cpp')
-rw-r--r-- | test/remote_logging_test_config.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/test/remote_logging_test_config.cpp b/test/remote_logging_test_config.cpp index b34a43f..cba54ea 100644 --- a/test/remote_logging_test_config.cpp +++ b/test/remote_logging_test_config.cpp @@ -3,19 +3,6 @@ #include <fstream> #include <string> -#if __has_include(<filesystem>) -#include <filesystem> -#elif __has_include(<experimental/filesystem>) -#include <experimental/filesystem> -namespace std -{ -// splice experimental::filesystem into std -namespace filesystem = std::experimental::filesystem; -} // namespace std -#else -#error filesystem not available -#endif - namespace phosphor { namespace logging @@ -34,13 +21,13 @@ std::string getConfig(const char* filePath) TEST_F(TestRemoteLogging, testOnlyAddress) { config->address("1.1.1.1"); - EXPECT_EQ(fs::exists(configFilePath.c_str()), false); + EXPECT_EQ(getConfig(configFilePath.c_str()), "*.* ~"); } TEST_F(TestRemoteLogging, testOnlyPort) { config->port(100); - EXPECT_EQ(fs::exists(configFilePath.c_str()), false); + EXPECT_EQ(getConfig(configFilePath.c_str()), "*.* ~"); } TEST_F(TestRemoteLogging, testGoodConfig) @@ -56,7 +43,7 @@ TEST_F(TestRemoteLogging, testClearAddress) config->port(100); EXPECT_EQ(getConfig(configFilePath.c_str()), "*.* @@1.1.1.1:100"); config->address(""); - EXPECT_EQ(fs::exists(configFilePath.c_str()), false); + EXPECT_EQ(getConfig(configFilePath.c_str()), "*.* ~"); } TEST_F(TestRemoteLogging, testClearPort) @@ -65,7 +52,7 @@ TEST_F(TestRemoteLogging, testClearPort) config->port(100); EXPECT_EQ(getConfig(configFilePath.c_str()), "*.* @@1.1.1.1:100"); config->port(0); - EXPECT_EQ(fs::exists(configFilePath.c_str()), false); + EXPECT_EQ(getConfig(configFilePath.c_str()), "*.* ~"); } } // namespace test |