]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#92,!13] Fully qualified namespaces in dora and host_mgr unittests.
authorMarcin Siodelski <marcin@isc.org>
Fri, 31 Aug 2018 18:21:15 +0000 (20:21 +0200)
committerMarcin Siodelski <marcin@isc.org>
Mon, 3 Sep 2018 07:31:34 +0000 (03:31 -0400)
src/bin/dhcp4/tests/dora_unittest.cc
src/lib/dhcpsrv/tests/host_mgr_unittest.cc

index 6a030a2e18a5de86c7e2e4bfa6e6b88b3fc3e60c..b72d9763f1e209dd114bc42d7219e36ff9464799 100644 (file)
@@ -1964,15 +1964,15 @@ public:
     ///
     /// Recreates MySQL schema for a test.
     DORAMySQLTest() : DORATest() {
-        destroyMySQLSchema();
-        createMySQLSchema();
+        db::test::destroyMySQLSchema();
+        db::test::createMySQLSchema();
     }
 
     /// @brief Destructor.
     ///
     /// Destroys MySQL schema.
     virtual ~DORAMySQLTest() {
-        destroyMySQLSchema();
+        db::test::destroyMySQLSchema();
     }
 };
 
@@ -1997,15 +1997,15 @@ public:
     ///
     /// Recreates PgSQL schema for a test.
     DORAPgSQLTest() : DORATest() {
-        destroyPgSQLSchema();
-        createPgSQLSchema();
+        db::test::destroyPgSQLSchema();
+       db::test::createPgSQLSchema();
     }
 
     /// @brief Destructor.
     ///
     /// Destroys PgSQL schema.
     virtual ~DORAPgSQLTest() {
-        destroyPgSQLSchema();
+        db::test::destroyPgSQLSchema();
     }
 };
 
@@ -2029,15 +2029,15 @@ public:
     ///
     /// Recreates CQL schema for a test.
     DORACQLTest() : DORATest() {
-        destroyCqlSchema(false, true);
-        createCqlSchema(false, true);
+        db::test::destroyCqlSchema(false, true);
+        db::test::createCqlSchema(false, true);
     }
 
     /// @brief Destructor.
     ///
     /// Destroys CQL schema.
     virtual ~DORACQLTest() {
-        destroyCqlSchema(false, true);
+        db::test::destroyCqlSchema(false, true);
     }
 };
 
index de50132bd16562c6ab61c8d7722e9e1e7d99ca2a..bac9a6711cee479adfb3c4d9dd9c750a31a1764c 100644 (file)
@@ -668,12 +668,12 @@ MySQLHostMgrTest::SetUp() {
     HostMgrTest::SetUp();
 
     // Ensure schema is the correct one.
-    destroyMySQLSchema();
-    createMySQLSchema();
+    db::test::destroyMySQLSchema();
+    db::test::createMySQLSchema();
 
     // Connect to the database
     try {
-        HostMgr::addBackend(validMySQLConnectionString());
+        HostMgr::addBackend(db::test::validMySQLConnectionString());
     } catch (...) {
         std::cerr << "*** ERROR: unable to open database. The test\n"
             "*** environment is broken and must be fixed before\n"
@@ -688,7 +688,7 @@ void
 MySQLHostMgrTest::TearDown() {
     HostMgr::instance().getHostDataSource()->rollback();
     HostMgr::delBackend("mysql");
-    destroyMySQLSchema();
+    db::test::destroyMySQLSchema();
 }
 
 /// @brief Test fixture class for validating @c HostMgr using
@@ -696,15 +696,15 @@ MySQLHostMgrTest::TearDown() {
 class MySQLHostMgrDbLostCallbackTest : public HostMgrDbLostCallbackTest {
 public:
     virtual void destroySchema() {
-        destroyMySQLSchema();
+        db::test::destroyMySQLSchema();
     }
 
     virtual void createSchema() {
-        createMySQLSchema();
+        db::test::createMySQLSchema();
     }
 
     virtual std::string validConnectString() {
-        return (validMySQLConnectionString());
+        return (db::test::validMySQLConnectionString());
     }
 };
 
@@ -765,12 +765,12 @@ PostgreSQLHostMgrTest::SetUp() {
     HostMgrTest::SetUp();
 
     // Ensure schema is the correct one.
-    destroyPgSQLSchema();
-    createPgSQLSchema();
+    db::test::destroyPgSQLSchema();
+    db::test::createPgSQLSchema();
 
     // Connect to the database
     try {
-        HostMgr::addBackend(validPgSQLConnectionString());
+        HostMgr::addBackend(db::test::validPgSQLConnectionString());
     } catch (...) {
         std::cerr << "*** ERROR: unable to open database. The test\n"
             "*** environment is broken and must be fixed before\n"
@@ -785,7 +785,7 @@ void
 PostgreSQLHostMgrTest::TearDown() {
     HostMgr::instance().getHostDataSource()->rollback();
     HostMgr::delBackend("postgresql");
-    destroyPgSQLSchema();
+    db::test::destroyPgSQLSchema();
 }
 
 /// @brief Test fixture class for validating @c HostMgr using
@@ -793,15 +793,15 @@ PostgreSQLHostMgrTest::TearDown() {
 class PostgreSQLHostMgrDbLostCallbackTest : public HostMgrDbLostCallbackTest {
 public:
     virtual void destroySchema() {
-        destroyPgSQLSchema();
+        db::test::destroyPgSQLSchema();
     }
 
     virtual void createSchema() {
-        createPgSQLSchema();
+        db::test::createPgSQLSchema();
     }
 
     virtual std::string validConnectString() {
-        return (validPgSQLConnectionString());
+        return (db::test::validPgSQLConnectionString());
     }
 };
 
@@ -860,12 +860,12 @@ CQLHostMgrTest::SetUp() {
     HostMgrTest::SetUp();
 
     // Ensure schema is the correct one.
-    destroyCqlSchema(false, true);
-    createCqlSchema(false, true);
+    db::test::destroyCqlSchema(false, true);
+    db::test::createCqlSchema(false, true);
 
     // Connect to the database
     try {
-        HostMgr::addBackend(validCqlConnectionString());
+        HostMgr::addBackend(db::test::validCqlConnectionString());
     } catch (...) {
         std::cerr << "*** ERROR: unable to open database. The test\n"
             "*** environment is broken and must be fixed before\n"
@@ -880,7 +880,7 @@ void
 CQLHostMgrTest::TearDown() {
     HostMgr::instance().getHostDataSource()->rollback();
     HostMgr::delBackend("cql");
-    destroyCqlSchema(false, true);
+    db::test::destroyCqlSchema(false, true);
 }
 
 // This test verifies that reservations for a particular client can