]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5076] decommentJSONFile moved to isc::test
authorTomek Mrugalski <tomasz@isc.org>
Tue, 7 Feb 2017 12:29:04 +0000 (13:29 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 7 Feb 2017 12:29:04 +0000 (13:29 +0100)
src/bin/agent/tests/parser_unittests.cc
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/parser_unittest.cc
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
src/bin/dhcp6/tests/parser_unittest.cc
src/lib/dhcp/tests/duid_factory_unittest.cc
src/lib/dhcpsrv/tests/cfg_duid_unittest.cc
src/lib/testutils/io_utils.cc
src/lib/testutils/io_utils.h

index d7dee07b5e3cbcbe15556dd3a719a31460facf8e..4b61d1814997218a58bdb9c42b7c6b42821ae9de 100644 (file)
@@ -11,6 +11,7 @@
 #include <testutils/io_utils.h>
 
 using namespace isc::data;
+using namespace isc::test;
 using namespace std;
 
 namespace isc {
index e9078c4fa9ccdd5926ec9a7795841db058cfccb5..6da5d1c825a097f74800b267a56897778349bcc2 100644 (file)
@@ -42,6 +42,7 @@ using namespace isc::dhcp;
 using namespace isc::dhcp::test;
 using namespace isc::hooks;
 using namespace isc::stats;
+using namespace isc::test;
 
 namespace {
 
index 6b37b4fbc947db3f74b6bde253f31f361b952131..bfb69c1c740d33eb5b25c7fd7448faa723d769bc 100644 (file)
@@ -10,6 +10,7 @@
 #include <testutils/io_utils.h>
 
 using namespace isc::data;
+using namespace isc::test;
 using namespace std;
 
 namespace isc {
index 202380b083a844ac0997d9447e3c84ba7576f693..addc1ab8d8b017b5972decb78d0f1af38eef06ac 100644 (file)
@@ -39,6 +39,7 @@ using namespace isc::dhcp;
 using namespace isc::dhcp::test;
 using namespace isc::hooks;
 using namespace isc::stats;
+using namespace isc::test;
 
 namespace {
 
index d0262225c91d0ad745d01b4f56c256e96e92e295..16895d0d55aab2f175799b5ce32ea9b0a8f82fa8 100644 (file)
@@ -11,6 +11,7 @@
 
 using namespace isc::data;
 using namespace std;
+using namespace isc::test;
 
 namespace isc {
 namespace dhcp {
index 87fcf9250117657071dfff7752aa1df8a875d869..c7e115bfe27be65c059b3fbb6216f97e05f6e369 100644 (file)
@@ -180,7 +180,7 @@ DUIDFactoryTest::removeDefaultFile() const {
 
 std::string
 DUIDFactoryTest::readDefaultFile() const {
-    return (dhcp::test::readFile(absolutePath(DEFAULT_DUID_FILE)));
+    return (isc::test::readFile(absolutePath(DEFAULT_DUID_FILE)));
 }
 
 std::vector<uint8_t>
index cb83b097f00b2c0e86e49444aa849e3299ca2053..1d7699383dc6f3898abc5486fd38eb04031c4264 100644 (file)
@@ -165,7 +165,7 @@ TEST_F(CfgDUIDTest, createLLT) {
               duid->toText());
 
     // Verify that the DUID file has been created.
-    EXPECT_TRUE(dhcp::test::fileExists(absolutePath(DUID_FILE_NAME)));
+    EXPECT_TRUE(isc::test::fileExists(absolutePath(DUID_FILE_NAME)));
 }
 
 // This method checks that the DUID-EN can be created from the
@@ -185,7 +185,7 @@ TEST_F(CfgDUIDTest, createEN) {
     EXPECT_EQ("00:02:00:00:10:10:25:0f:3e:26:a7:62", duid->toText());
 
     // Verify that the DUID file has been created.
-    EXPECT_TRUE(dhcp::test::fileExists(absolutePath(DUID_FILE_NAME)));
+    EXPECT_TRUE(isc::test::fileExists(absolutePath(DUID_FILE_NAME)));
 }
 
 // This method checks that the DUID-LL can be created from the
@@ -205,7 +205,7 @@ TEST_F(CfgDUIDTest, createLL) {
     EXPECT_EQ("00:03:00:02:12:41:34:a4:b3:67", duid->toText());
 
     // Verify that the DUID file has been created.
-    EXPECT_TRUE(dhcp::test::fileExists(absolutePath(DUID_FILE_NAME)));
+    EXPECT_TRUE(isc::test::fileExists(absolutePath(DUID_FILE_NAME)));
 }
 
 // This test verifies that it is possible to disable storing
@@ -226,7 +226,7 @@ TEST_F(CfgDUIDTest, createDisableWrite) {
     EXPECT_EQ("00:02:00:00:10:10:25:0f:3e:26:a7:62", duid->toText());
 
     // DUID persistence is disabled so there should be no DUID file.
-    EXPECT_FALSE(dhcp::test::fileExists(absolutePath(DUID_FILE_NAME)));
+    EXPECT_FALSE(isc::test::fileExists(absolutePath(DUID_FILE_NAME)));
 }
 
 } // end of anonymous namespace
index 25b14588563a59ad44d6f72c0f3fb79e482280ad..5e0e3554d7e3fccdc4742e9c4e8b36e95a605cb6 100644 (file)
@@ -12,7 +12,6 @@
 #include <string>
 
 namespace isc {
-namespace dhcp {
 namespace test {
 
 bool fileExists(const std::string& file_path) {
@@ -109,6 +108,5 @@ std::string decommentJSONfile(const std::string& input_file) {
     return (outfile);
 }
 
-}; // end of isc::dhcp::test namespace
-}; // end of isc::dhcp namespace
+}; // end of isc::test namespace
 }; // end of isc namespace
index 1aa15570a4da93cc2e791322c2d765f90a674454..ce4b57ccf29f657edfd707fcf41956b4d8d2da68 100644 (file)
@@ -11,7 +11,6 @@
 #include <sys/stat.h>
 
 namespace isc {
-namespace dhcp {
 namespace test {
 
 /// @brief Checks if specified file exists.
@@ -40,8 +39,7 @@ std::string readFile(const std::string& file_path);
 /// @throw BadValue if the input file cannot be opened
 std::string decommentJSONfile(const std::string& input_file);
 
-}; // end of isc::dhcp::test namespace
-}; // end of isc::dhcp namespace
+}; // end of isc::test namespace
 }; // end of isc namespace
 
 #endif // TEST_IO_UTILS_H