///
/// 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();
}
};
///
/// 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();
}
};
///
/// 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);
}
};
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"
MySQLHostMgrTest::TearDown() {
HostMgr::instance().getHostDataSource()->rollback();
HostMgr::delBackend("mysql");
- destroyMySQLSchema();
+ db::test::destroyMySQLSchema();
}
/// @brief Test fixture class for validating @c HostMgr using
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());
}
};
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"
PostgreSQLHostMgrTest::TearDown() {
HostMgr::instance().getHostDataSource()->rollback();
HostMgr::delBackend("postgresql");
- destroyPgSQLSchema();
+ db::test::destroyPgSQLSchema();
}
/// @brief Test fixture class for validating @c HostMgr using
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());
}
};
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"
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