Commit 8a8b8605 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[3961_rebase] Changes after review:

 - DataSource renamed to DatabaseConnection
 - exception now prints missing parameter name
 - description updated
 - unnecessary this removed
parent 66fb7589
......@@ -92,7 +92,7 @@ libkea_dhcpsrv_la_SOURCES += csv_lease_file6.cc csv_lease_file6.h
libkea_dhcpsrv_la_SOURCES += d2_client_cfg.cc d2_client_cfg.h
libkea_dhcpsrv_la_SOURCES += d2_client_mgr.cc d2_client_mgr.h
libkea_dhcpsrv_la_SOURCES += daemon.cc daemon.h
libkea_dhcpsrv_la_SOURCES += data_source.cc data_source.h
libkea_dhcpsrv_la_SOURCES += database_connection.cc database_connection.h
libkea_dhcpsrv_la_SOURCES += dhcpsrv_log.cc dhcpsrv_log.h
libkea_dhcpsrv_la_SOURCES += host.cc host.h
libkea_dhcpsrv_la_SOURCES += host_container.h
......
......@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <dhcpsrv/data_source.h>
#include <dhcpsrv/database_connection.h>
#include <dhcpsrv/dhcpsrv_log.h>
#include <exceptions/exceptions.h>
......@@ -26,17 +26,17 @@ using namespace std;
namespace isc {
namespace dhcp {
std::string DataSource::getParameter(const std::string& name) const {
std::string DatabaseConnection::getParameter(const std::string& name) const {
ParameterMap::const_iterator param = parameters_.find(name);
if (param == parameters_.end()) {
isc_throw(BadValue, "Parameter not found");
isc_throw(BadValue, "Parameter " << name << " not found");
}
return (param->second);
}
DataSource::ParameterMap
DataSource::parse(const std::string& dbaccess) {
DataSource::ParameterMap mapped_tokens;
DatabaseConnection::ParameterMap
DatabaseConnection::parse(const std::string& dbaccess) {
DatabaseConnection::ParameterMap mapped_tokens;
if (!dbaccess.empty()) {
vector<string> tokens;
......@@ -64,11 +64,11 @@ DataSource::parse(const std::string& dbaccess) {
}
std::string
DataSource::redactedAccessString(const DataSource::ParameterMap& parameters) {
DatabaseConnection::redactedAccessString(const ParameterMap& parameters) {
// Reconstruct the access string: start of with an empty string, then
// work through all the parameters in the original string and add them.
std::string access;
for (DataSource::ParameterMap::const_iterator i = parameters.begin();
for (DatabaseConnection::ParameterMap::const_iterator i = parameters.begin();
i != parameters.end(); ++i) {
// Separate second and subsequent tokens are preceded by a space.
......
......@@ -49,8 +49,11 @@ public:
///
/// This class provides functions that are common for establishing
/// connection with different types of databases; enables operations
/// on access parameters strings.
class DataSource : public boost::noncopyable {
/// on access parameters strings. In particular, it provides a way
/// to parse parameters in key=value format. This class is expected
/// to be a base class for all LeaseMgr and possibly HostDataSource
/// derived classes.
class DatabaseConnection : public boost::noncopyable {
public:
/// Database configuration parameter map
......@@ -60,7 +63,7 @@ public:
///
/// @param parameters A data structure relating keywords and values
/// concerned with the database.
DataSource(const ParameterMap& parameters)
DatabaseConnection(const ParameterMap& parameters)
:parameters_(parameters) {
}
......@@ -77,7 +80,7 @@ public:
/// @param dbaccess Database access string.
///
/// @return std::map<std::string, std::string> Map of keyword/value pairs.
static DataSource::ParameterMap parse(const std::string& dbaccess);
static DatabaseConnection::ParameterMap parse(const std::string& dbaccess);
/// @brief Redact database access string
///
......@@ -88,7 +91,7 @@ public:
///
/// @return Redacted database access string.
static std::string redactedAccessString(
const DataSource::ParameterMap& parameters);
const DatabaseConnection::ParameterMap& parameters);
protected:
......
......@@ -51,8 +51,8 @@ LeaseMgrFactory::create(const std::string& dbaccess) {
const std::string type = "type";
// Parse the access string and create a redacted string for logging.
DataSource::ParameterMap parameters = DataSource::parse(dbaccess);
std::string redacted = DataSource::redactedAccessString(parameters);
DatabaseConnection::ParameterMap parameters = DatabaseConnection::parse(dbaccess);
std::string redacted = DatabaseConnection::redactedAccessString(parameters);
// Is "type" present?
if (parameters.find(type) == parameters.end()) {
......
......@@ -16,7 +16,7 @@
#define LEASE_MGR_FACTORY_H
#include <dhcpsrv/lease_mgr.h>
#include <dhcpsrv/data_source.h>
#include <dhcpsrv/database_connection.h>
#include <exceptions/exceptions.h>
#include <string>
......
......@@ -220,9 +220,8 @@ LFCSetup::getExitStatus() const {
return (process_->getExitStatus(pid_));
}
Memfile_LeaseMgr::Memfile_LeaseMgr(const ParameterMap& parameters)
: DataSource(parameters),
: DatabaseConnection(parameters),
lfc_setup_(new LFCSetup(boost::bind(&Memfile_LeaseMgr::lfcCallback, this),
*getIOService()))
{
......
......@@ -20,7 +20,7 @@
#include <dhcpsrv/csv_lease_file4.h>
#include <dhcpsrv/csv_lease_file6.h>
#include <dhcpsrv/memfile_lease_storage.h>
#include <dhcpsrv/data_source.h>
#include <dhcpsrv/database_connection.h>
#include <dhcpsrv/lease_mgr.h>
#include <util/process_spawn.h>
......@@ -86,7 +86,7 @@ class LFCSetup;
/// is not specified, the default location in the installation
/// directory is used: var/kea/kea-leases4.csv and
/// var/kea/kea-leases6.csv.
class Memfile_LeaseMgr : public LeaseMgr, public DataSource {
class Memfile_LeaseMgr : public LeaseMgr, public DatabaseConnection {
public:
/// @defgroup versions Specified memfile backend version.
......
......@@ -147,21 +147,21 @@ void
MySqlConnection::prepareStatement(uint32_t index, const char* text) {
// Validate that there is space for the statement in the statements array
// and that nothing has been placed there before.
if ((index >= this->statements_.size()) || (this->statements_[index] != NULL)) {
if ((index >= statements_.size()) || (statements_[index] != NULL)) {
isc_throw(InvalidParameter, "invalid prepared statement index (" <<
static_cast<int>(index) << ") or indexed prepared " <<
"statement is not null");
}
// All OK, so prepare the statement
this->text_statements_[index] = std::string(text);
this->statements_[index] = mysql_stmt_init(mysql_);
if (this->statements_[index] == NULL) {
text_statements_[index] = std::string(text);
statements_[index] = mysql_stmt_init(mysql_);
if (statements_[index] == NULL) {
isc_throw(DbOperationError, "unable to allocate MySQL prepared "
"statement structure, reason: " << mysql_error(mysql_));
}
int status = mysql_stmt_prepare(this->statements_[index], text, strlen(text));
int status = mysql_stmt_prepare(statements_[index], text, strlen(text));
if (status != 0) {
isc_throw(DbOperationError, "unable to prepare MySQL statement <" <<
text << ">, reason: " << mysql_error(mysql_));
......
......@@ -17,7 +17,7 @@
#include <dhcp/hwaddr.h>
#include <dhcpsrv/lease_mgr.h>
#include <dhcpsrv/data_source.h>
#include <dhcpsrv/database_connection.h>
#include <boost/scoped_ptr.hpp>
#include <mysql.h>
......@@ -140,14 +140,14 @@ private:
/// used by both MySqlLeaseMgr and MySqlHostDataSource. It manages connecting
/// to the database and preparing compiled statements.
class MySqlConnection : public DataSource {
class MySqlConnection : public DatabaseConnection {
public:
/// @brief Constructor
///
/// Initialize MySqlConnection object with parameters needed for connection.
MySqlConnection(const ParameterMap& parameters)
: DataSource(parameters) {
: DatabaseConnection(parameters) {
}
/// @brief Destructor
......@@ -190,13 +190,13 @@ public:
/// @throw DbOpenError Error opening the database
void openDatabase();
protected:
std::vector<MYSQL_STMT*> statements_; ///< Prepared statements
std::vector<std::string> text_statements_; ///< Raw text of statements
protected:
/// @brief MySQL connection handle
MySqlHolder mysql_;
};
......
......@@ -942,8 +942,8 @@ private:
//@}
};
PgSqlLeaseMgr::PgSqlLeaseMgr(const DataSource::ParameterMap& parameters)
: LeaseMgr(), DataSource(parameters), exchange4_(new PgSqlLease4Exchange()),
PgSqlLeaseMgr::PgSqlLeaseMgr(const DatabaseConnection::ParameterMap& parameters)
: LeaseMgr(), DatabaseConnection(parameters), exchange4_(new PgSqlLease4Exchange()),
exchange6_(new PgSqlLease6Exchange()), conn_(NULL) {
openDatabase();
prepareStatements();
......
......@@ -17,7 +17,7 @@
#include <dhcp/hwaddr.h>
#include <dhcpsrv/lease_mgr.h>
#include <dhcpsrv/data_source.h>
#include <dhcpsrv/database_connection.h>
#include <boost/scoped_ptr.hpp>
#include <boost/utility.hpp>
#include <libpq-fe.h>
......@@ -121,7 +121,7 @@ const uint32_t PG_CURRENT_MINOR = 0;
/// This class provides the \ref isc::dhcp::LeaseMgr interface to the PostgreSQL
/// database. Use of this backend presupposes that a PostgreSQL database is
/// available and that the Kea schema has been created within it.
class PgSqlLeaseMgr : public LeaseMgr, DataSource {
class PgSqlLeaseMgr : public LeaseMgr, DatabaseConnection {
public:
/// @brief Constructor
......@@ -146,7 +146,7 @@ public:
/// @throw isc::dhcp::DbOpenError Error opening the database
/// @throw isc::dhcp::DbOperationError An operation on the open database has
/// failed.
PgSqlLeaseMgr(const DataSource::ParameterMap& parameters);
PgSqlLeaseMgr(const DatabaseConnection::ParameterMap& parameters);
/// @brief Destructor (closes database)
virtual ~PgSqlLeaseMgr();
......
......@@ -14,7 +14,7 @@
#include <config.h>
#include <exceptions/exceptions.h>
#include <dhcpsrv/data_source.h>
#include <dhcpsrv/database_connection.h>
#include <gtest/gtest.h>
using namespace isc::dhcp;
......@@ -24,12 +24,12 @@ using namespace isc::dhcp;
///
/// This test checks if the LeaseMgr can be instantiated and that it
/// parses parameters string properly.
TEST(DataSourceTest, getParameter) {
TEST(DatabaseConnectionTest, getParameter) {
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap[std::string("param1")] = std::string("value1");
pmap[std::string("param2")] = std::string("value2");
DataSource datasrc(pmap);
DatabaseConnection datasrc(pmap);
EXPECT_EQ("value1", datasrc.getParameter("param1"));
EXPECT_EQ("value2", datasrc.getParameter("param2"));
......@@ -37,9 +37,9 @@ TEST(DataSourceTest, getParameter) {
}
// This test checks that a database access string can be parsed correctly.
TEST(DataSourceTest, parse) {
TEST(DatabaseConnectionTest, parse) {
DataSource::ParameterMap parameters = DataSource::parse(
DatabaseConnection::ParameterMap parameters = DatabaseConnection::parse(
"user=me password=forbidden name=kea somethingelse= type=mysql");
EXPECT_EQ(5, parameters.size());
......@@ -51,25 +51,25 @@ TEST(DataSourceTest, parse) {
}
// This test checks that an invalid database access string behaves as expected.
TEST(DataSourceTest, parseInvalid) {
TEST(DatabaseConnectionTest, parseInvalid) {
// No tokens in the string, so we expect no parameters
std::string invalid = "";
DataSource::ParameterMap parameters = DataSource::parse(invalid);
DatabaseConnection::ParameterMap parameters = DatabaseConnection::parse(invalid);
EXPECT_EQ(0, parameters.size());
// With spaces, there are some tokens so we expect invalid parameter
// as there are no equals signs.
invalid = " \t ";
EXPECT_THROW(DataSource::parse(invalid), isc::InvalidParameter);
EXPECT_THROW(DatabaseConnection::parse(invalid), isc::InvalidParameter);
invalid = " noequalshere ";
EXPECT_THROW(DataSource::parse(invalid), isc::InvalidParameter);
EXPECT_THROW(DatabaseConnection::parse(invalid), isc::InvalidParameter);
// A single "=" is valid string, but is placed here as the result is
// expected to be nothing.
invalid = "=";
parameters = DataSource::parse(invalid);
parameters = DatabaseConnection::parse(invalid);
EXPECT_EQ(1, parameters.size());
EXPECT_EQ("", parameters[""]);
}
......@@ -78,10 +78,10 @@ TEST(DataSourceTest, parseInvalid) {
///
/// Checks that the redacted configuration string includes the password only
/// as a set of asterisks.
TEST(DataSourceTest, redactAccessString) {
TEST(DatabaseConnectionTest, redactAccessString) {
DataSource::ParameterMap parameters =
DataSource::parse("user=me password=forbidden name=kea type=mysql");
DatabaseConnection::ParameterMap parameters =
DatabaseConnection::parse("user=me password=forbidden name=kea type=mysql");
EXPECT_EQ(4, parameters.size());
EXPECT_EQ("me", parameters["user"]);
EXPECT_EQ("forbidden", parameters["password"]);
......@@ -90,8 +90,8 @@ TEST(DataSourceTest, redactAccessString) {
// Redact the result. To check, break the redacted string down into its
// components.
std::string redacted = DataSource::redactedAccessString(parameters);
parameters = DataSource::parse(redacted);
std::string redacted = DatabaseConnection::redactedAccessString(parameters);
parameters = DatabaseConnection::parse(redacted);
EXPECT_EQ(4, parameters.size());
EXPECT_EQ("me", parameters["user"]);
......@@ -104,10 +104,10 @@ TEST(DataSourceTest, redactAccessString) {
///
/// Checks that the redacted configuration string includes the password only
/// as a set of asterisks, even if the password is null.
TEST(DataSourceTest, redactAccessStringEmptyPassword) {
TEST(DatabaseConnectionTest, redactAccessStringEmptyPassword) {
DataSource::ParameterMap parameters =
DataSource::parse("user=me name=kea type=mysql password=");
DatabaseConnection::ParameterMap parameters =
DatabaseConnection::parse("user=me name=kea type=mysql password=");
EXPECT_EQ(4, parameters.size());
EXPECT_EQ("me", parameters["user"]);
EXPECT_EQ("", parameters["password"]);
......@@ -116,8 +116,8 @@ TEST(DataSourceTest, redactAccessStringEmptyPassword) {
// Redact the result. To check, break the redacted string down into its
// components.
std::string redacted = DataSource::redactedAccessString(parameters);
parameters = DataSource::parse(redacted);
std::string redacted = DatabaseConnection::redactedAccessString(parameters);
parameters = DatabaseConnection::parse(redacted);
EXPECT_EQ(4, parameters.size());
EXPECT_EQ("me", parameters["user"]);
......@@ -127,15 +127,15 @@ TEST(DataSourceTest, redactAccessStringEmptyPassword) {
// ... and again to check that the position of the empty password in the
// string does not matter.
parameters = DataSource::parse("user=me password= name=kea type=mysql");
parameters = DatabaseConnection::parse("user=me password= name=kea type=mysql");
EXPECT_EQ(4, parameters.size());
EXPECT_EQ("me", parameters["user"]);
EXPECT_EQ("", parameters["password"]);
EXPECT_EQ("kea", parameters["name"]);
EXPECT_EQ("mysql", parameters["type"]);
redacted = DataSource::redactedAccessString(parameters);
parameters = DataSource::parse(redacted);
redacted = DatabaseConnection::redactedAccessString(parameters);
parameters = DatabaseConnection::parse(redacted);
EXPECT_EQ(4, parameters.size());
EXPECT_EQ("me", parameters["user"]);
......@@ -148,10 +148,10 @@ TEST(DataSourceTest, redactAccessStringEmptyPassword) {
///
/// Checks that the redacted configuration string excludes the password if there
/// was no password to begin with.
TEST(DataSourceTest, redactAccessStringNoPassword) {
TEST(DatabaseConnectionTest, redactAccessStringNoPassword) {
DataSource::ParameterMap parameters =
DataSource::parse("user=me name=kea type=mysql");
DatabaseConnection::ParameterMap parameters =
DatabaseConnection::parse("user=me name=kea type=mysql");
EXPECT_EQ(3, parameters.size());
EXPECT_EQ("me", parameters["user"]);
EXPECT_EQ("kea", parameters["name"]);
......@@ -159,8 +159,8 @@ TEST(DataSourceTest, redactAccessStringNoPassword) {
// Redact the result. To check, break the redacted string down into its
// components.
std::string redacted = DataSource::redactedAccessString(parameters);
parameters = DataSource::parse(redacted);
std::string redacted = DatabaseConnection::redactedAccessString(parameters);
parameters = DatabaseConnection::parse(redacted);
EXPECT_EQ(3, parameters.size());
EXPECT_EQ("me", parameters["user"]);
......
......@@ -161,7 +161,7 @@ public:
// Check that the keywords and keyword values are the same: loop
// through the keywords in the database access string.
for (DataSource::ParameterMap::const_iterator actual = parameters.begin();
for (DatabaseConnection::ParameterMap::const_iterator actual = parameters.begin();
actual != parameters.end(); ++actual) {
// Does the keyword exist in the set of expected keywords?
......
......@@ -15,7 +15,7 @@
#include <config.h>
#include <dhcpsrv/tests/generic_lease_mgr_unittest.h>
#include <dhcpsrv/tests/test_utils.h>
#include <dhcpsrv/data_source.h>
#include <dhcpsrv/database_connection.h>
#include <asiolink/io_address.h>
#include <gtest/gtest.h>
#include <sstream>
......
......@@ -43,7 +43,7 @@ public:
/// dbconfig is a generic way of passing parameters. Parameters
/// are passed in the "name=value" format, separated by spaces.
/// Values may be enclosed in double quotes, if needed.
ConcreteLeaseMgr(const DataSource::ParameterMap&)
ConcreteLeaseMgr(const DatabaseConnection::ParameterMap&)
: LeaseMgr()
{}
......@@ -261,7 +261,7 @@ namespace {
// 1 (return the lease) and more than 1 leases (throw).
TEST_F(LeaseMgrTest, getLease6) {
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
boost::scoped_ptr<ConcreteLeaseMgr> mgr(new ConcreteLeaseMgr(pmap));
vector<Lease6Ptr> leases = createLeases6();
......
......@@ -257,7 +257,7 @@ public:
// This test checks if the LeaseMgr can be instantiated and that it
// parses parameters string properly.
TEST_F(MemfileLeaseMgrTest, constructor) {
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["universe"] = "4";
pmap["persist"] = "false";
boost::scoped_ptr<Memfile_LeaseMgr> lease_mgr;
......@@ -295,7 +295,7 @@ TEST_F(MemfileLeaseMgrTest, getLeaseFilePath) {
LeaseFileIO io4(getLeaseFilePath("leasefile4_1.csv"));
LeaseFileIO io6(getLeaseFilePath("leasefile6_1.csv"));
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["universe"] = "4";
pmap["name"] = getLeaseFilePath("leasefile4_1.csv");
boost::scoped_ptr<Memfile_LeaseMgr> lease_mgr(new Memfile_LeaseMgr(pmap));
......@@ -317,7 +317,7 @@ TEST_F(MemfileLeaseMgrTest, persistLeases) {
LeaseFileIO io4(getLeaseFilePath("leasefile4_1.csv"));
LeaseFileIO io6(getLeaseFilePath("leasefile6_1.csv"));
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["universe"] = "4";
// Specify the names of the lease files. Leases will be written.
pmap["name"] = getLeaseFilePath("leasefile4_1.csv");
......@@ -343,7 +343,7 @@ TEST_F(MemfileLeaseMgrTest, persistLeases) {
// Check if it is possible to schedule the timer to perform the Lease
// File Cleanup periodically.
TEST_F(MemfileLeaseMgrTest, lfcTimer) {
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "4";
// Specify the names of the lease files. Leases will be written.
......@@ -372,7 +372,7 @@ TEST_F(MemfileLeaseMgrTest, lfcTimer) {
// This test checks if the LFC timer is disabled (doesn't trigger)
// cleanups when the lfc-interval is set to 0.
TEST_F(MemfileLeaseMgrTest, lfcTimerDisabled) {
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "4";
pmap["name"] = getLeaseFilePath("leasefile4_0.csv");
......@@ -422,7 +422,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCleanup4) {
previous_file.writeFile(previous_file_contents);
// Create the backend.
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "4";
pmap["name"] = getLeaseFilePath("leasefile4_0.csv");
......@@ -502,7 +502,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCleanup6) {
previous_file.writeFile(previous_file_contents);
// Create the backend.
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "6";
pmap["name"] = getLeaseFilePath("leasefile6_0.csv");
......@@ -577,7 +577,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCleanupStartFail) {
setenv("KEA_LFC_EXECUTABLE", "foobar", 1);
// Create the backend.
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "4";
pmap["name"] = getLeaseFilePath("leasefile4_0.csv");
......@@ -626,7 +626,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileFinish) {
finish_file.writeFile(finish_file_contents);
// Create the backend.
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "6";
pmap["name"] = getLeaseFilePath("leasefile6_0.csv");
......@@ -691,7 +691,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCopy) {
input_file.writeFile(input_file_contents);
// Create the backend.
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "6";
pmap["name"] = getLeaseFilePath("leasefile6_0.csv");
......@@ -729,7 +729,7 @@ TEST_F(MemfileLeaseMgrTest, leaseFileCopy) {
// at which the IOService must be executed to run the handlers
// for the installed timers.
TEST_F(MemfileLeaseMgrTest, getIOServiceExecInterval) {
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "4";
pmap["name"] = getLeaseFilePath("leasefile4_0.csv");
......@@ -1139,7 +1139,7 @@ TEST_F(MemfileLeaseMgrTest, load4CompletedFile) {
// lease files if the LFC is in progress.
TEST_F(MemfileLeaseMgrTest, load4LFCInProgress) {
// Create the backend configuration.
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "4";
pmap["name"] = getLeaseFilePath("leasefile4_0.csv");
......@@ -1378,7 +1378,7 @@ TEST_F(MemfileLeaseMgrTest, load6CompletedFile) {
// lease files if the LFC is in progress.
TEST_F(MemfileLeaseMgrTest, load6LFCInProgress) {
// Create the backend configuration.
DataSource::ParameterMap pmap;
DatabaseConnection::ParameterMap pmap;
pmap["type"] = "memfile";
pmap["universe"] = "6";
pmap["name"] = getLeaseFilePath("leasefile6_0.csv");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment