using namespace isc;
using namespace isc::dhcp;
-using namespace isc::dhcp::test;
using namespace isc::asiolink;
namespace {
HostMgrTest::SetUp();
// Ensure schema is the correct one.
- destroyMySQLSchema();
- createMySQLSchema();
+ test::destroyMySQLSchema();
+ test::createMySQLSchema();
// Connect to the database
try {
- HostMgr::create(validMySQLConnectionString());
+ HostMgr::create(test::validMySQLConnectionString());
} catch (...) {
std::cerr << "*** ERROR: unable to open database. The test\n"
"*** environment is broken and must be fixed before\n"
MySQLHostMgrTest::TearDown() {
HostDataSourceFactory::getHostDataSourcePtr()->rollback();
HostDataSourceFactory::destroy();
- destroyMySQLSchema();
+ test::destroyMySQLSchema();
}
// This test verifies that reservations for a particular client can
class PostgreSQLHostMgrTest : public HostMgrTest {
protected:
- /// @brief Prepares the class for a test.
+ /// @brief Build PostgreSQL schema for a test.
virtual void SetUp();
+ /// @brief Rollback and drop PostgreSQL schema after the test.
virtual void TearDown();
};
HostMgrTest::SetUp();
// Ensure schema is the correct one.
- destroyPgSQLSchema();
- createPgSQLSchema();
+ test::destroyPgSQLSchema();
+ test::createPgSQLSchema();
// Connect to the database
try {
PostgreSQLHostMgrTest::TearDown() {
HostDataSourceFactory::getHostDataSourcePtr()->rollback();
HostDataSourceFactory::destroy();
- destroyPgSQLSchema();
+ test::destroyPgSQLSchema();
}
// This test verifies that reservations for a particular client can