.. note::
- Hook libraries, such as the the ISC subscriber-only GSS-TSIG library,
+ Hook libraries, such as the ISC subscriber-only GSS-TSIG library,
make new statistics available in Kea.
More information about Kea statistics can be found at :ref:`stats`.
dump_qry=""
# Detect if this is installed or in sources. Check for sources first, so that
-# the the unexpected situations with weird paths fall on the default case of
+# the unexpected situations with weird paths fall on the default case of
# installed.
script_path=$(cd "$(dirname "${0}")" && pwd)
if test "${script_path}" = "@abs_top_builddir@/src/bin/admin"; then
admin_utils="@abs_top_builddir@/src/bin/admin/admin-utils.sh"
KEA_LFC="@abs_top_builddir@/src/bin/lfc/kea-lfc"
- SCRIPTS_DIR="@abs_top_builddir@/src/share/database/scripts"
+ SCRIPTS_DIR="@abs_top_srcdir@/src/share/database/scripts"
else
admin_utils="@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"
KEA_LFC="@sbindir@/kea-lfc"
// This test verifies that the full command line for the process is
// returned.
TEST_F(ProcessSpawnTest, getCommandLine) {
- // Note that cases below are enclosed in separate scopes to make
- // sure that the ProcessSpawn object is destroyed before a new
- // object is created. Current implementation doesn't allow for
- // having two ProcessSpawn objects simultaneously as they will
- // both try to allocate a signal handler for SIGCHLD.
{
// Case 1: arguments present.
ProcessArgs args;
SUBDIRS = .
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
-TEST_CA_DIR = $(abs_srcdir)/../../asiolink/testutils/ca
+TEST_CA_DIR = $(realpath $(abs_srcdir)/../../asiolink/testutils/ca)
AM_CPPFLAGS += -DTEST_CA_DIR=\"$(TEST_CA_DIR)\"
AM_CXXFLAGS = $(KEA_CXXFLAGS)
database and the client will get a NoAddrsAvail for that IA_NA option.
% DHCPSRV_HOST_MGR_DB_OPEN_CONNECTION_WITH_RETRY_FAILED Failed to connect to database: %1 with error: %2
-This is an informational message issued when the the server failed to connect to
+This is an informational message issued when the server failed to connect to
the host database. The operation started a retry to connect procedure.
The database access string with password redacted is logged, along with the
error and details for the reconnect procedure.
by an unknown exception.
% DHCPSRV_LEASE_MGR_DB_OPEN_CONNECTION_WITH_RETRY_FAILED Failed to connect to database: %1 with error: %2
-This is an informational message issued when the the server failed to connect to
+This is an informational message issued when the server failed to connect to
the lease database. The operation started a retry to connect procedure.
The database access string with password redacted is logged, along with the
error and details for the reconnect procedure.
@subsection hooksdgBuild Building the Library
Building the code requires building a sharable library. This requires
-the the code be compiled as position-independent code (using the
+the code be compiled as position-independent code (using the
compiler's "-fpic" switch) and linked as a shared library (with the
linker's "-shared" switch). The build command also needs to point to
the Kea include directory and link in the appropriate libraries.
/// @brief TLS flag (true when TLS was required, false otherwise).
bool tls_;
+ /// @brief Holds location to kea-admin. By default, it points to kea-admin
+ /// from installation. In tests, it points to kea-admin from sources.
static std::string KEA_ADMIN_;
};
SUBDIRS = .
AM_CPPFLAGS =
-AM_CPPFLAGS += -DABS_TOP_BUILDDIR="\"$(abs_top_builddir)\""
+AM_CPPFLAGS += -DABS_SRCDIR="\"$(abs_top_builddir)\""
AM_CPPFLAGS += -DKEA_ADMIN=\"${abs_top_builddir}/src/bin/admin/kea-admin\"
AM_CPPFLAGS += -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS)
parameters = DatabaseConnection::parse(full_mysql_connection_string);
kea_admin_parameters = MySqlConnection::toKeaAdminParameters(parameters);
EXPECT_EQ(kea_admin_parameters,
- vector<string>(
- {"mysql", "--extra",
- "--ssl-cert " ABS_TOP_BUILDDIR "/src/lib/database/testutils/../../asiolink/"
- "testutils/ca/kea-client.crt",
- "--extra", "--ssl-cipher AES", "--extra", "--connect_timeout 10", "--host",
- "127.0.0.1", "--extra",
- "--ssl-key " ABS_TOP_BUILDDIR "/src/lib/database/testutils/../../asiolink/"
- "testutils/ca/kea-client.key",
- "--name", "keatest", "--password", "keatest", "--extra",
- "--ssl-ca " ABS_TOP_BUILDDIR "/src/lib/database/testutils/../../asiolink/"
- "testutils/ca/kea-ca.crt",
- "--user", "keatest_secure"}));
+ vector<string>({"mysql", "--extra",
+ "--ssl-cert " ABS_SRCDIR "/src/lib/asiolink/testutils/ca/"
+ "kea-client.crt",
+ "--extra", "--ssl-cipher AES", "--extra", "--connect_timeout 10",
+ "--host", "127.0.0.1", "--extra",
+ "--ssl-key " ABS_SRCDIR "/src/lib/asiolink/testutils/ca/"
+ "kea-client.key",
+ "--name", "keatest", "--password", "keatest", "--extra",
+ "--ssl-ca " ABS_SRCDIR "/src/lib/asiolink/testutils/ca/kea-ca.crt",
+ "--user", "keatest_secure"}));
}
} // namespace
IOServiceAccessorPtr ac(new IOServiceAccessor(&DatabaseConnection::getIOService));
pair<uint32_t, uint32_t> schema_version;
try {
- // Attempt to get version without retrying or other sophistries. This
- // provides the most accurate view of the status of the database and the
- // most flexibility to reacting to errors.
schema_version = getVersion(parameters, ac, cb, retry ? timer_name : string());
} catch (DbOpenError const& exception) {
throw;
/// is already in progress.
int transaction_ref_count_;
+ /// @brief Holds location to kea-admin. By default, it points to kea-admin
+ /// from installation. In tests, it points to kea-admin from sources.
static std::string KEA_ADMIN_;
};
TestRowSet fetched_rows;
// Run the select. The row consumption lambda should populate
- // fetched_rows based on the the result set returned by the select.
+ // fetched_rows based on the result set returned by the select.
conn_->selectQuery(tagged_statements[GET_BY_INT_RANGE], in_bindings,
[&](PgSqlResult& r, size_t row) {
TestRow fetched_row;
/// In this test, the input data is a set of rows that describe
/// which rows in the database to update and how. For each row
/// in the set we find the record in the database with matching
- /// int_col value and replace its text_col value with the the
+ /// int_col value and replace its text_col value with the
/// text value from the input the row.
///
/// @param update_rows Collection of rows of data to update.
updated configuration from the Kea configuration system.
% DCTL_DB_OPEN_CONNECTION_WITH_RETRY_FAILED Failed to connect to database: %1 with error: %2
-This is an informational message issued when the the server failed to connect to
+This is an informational message issued when the server failed to connect to
the configuration database. The operation started a retry to connect procedure.
The database access string with password redacted is logged, along with the
error and details for the reconnect procedure.
return ((stats.st_mode & S_IFMT) == S_IFREG);
}
-
} // namespace file
} // namespace log
} // namespace isc
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
+AM_CPPFLAGS += -DABS_SRCDIR=\"$(abs_srcdir)\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_builddir)\"
AM_CXXFLAGS = $(KEA_CXXFLAGS)
};
FileUtilTest::~FileUtilTest() {
- string test_file_name = string(TEST_DATA_BUILDDIR) + "/fu.test";
+ string test_file_name(TEST_DATA_BUILDDIR "/fu.test");
static_cast<void>(remove(test_file_name.c_str()));
}
/// @brief Check getContent works.
TEST_F(FileUtilTest, basic) {
- string file_name = string(TEST_DATA_BUILDDIR) + "/fu.test";
+ string file_name(TEST_DATA_BUILDDIR "/fu.test");
ofstream fs(file_name.c_str(), ofstream::out | ofstream::trunc);
ASSERT_TRUE(fs.is_open());
fs << "abdc";
TEST_F(FileUtilTest, isDir) {
EXPECT_TRUE(isDir("/dev"));
EXPECT_FALSE(isDir("/dev/null"));
- EXPECT_FALSE(isDir("/this/does/not/exists"));
+ EXPECT_FALSE(isDir("/this/does/not/exist"));
EXPECT_FALSE(isDir("/etc/hosts"));
}
/// @brief Check isFile.
TEST_F(FileUtilTest, isFile) {
- EXPECT_TRUE(isFile("file_utilities_unittest.cc"));
+ EXPECT_TRUE(isFile(ABS_SRCDIR "/file_utilities_unittest.cc"));
EXPECT_FALSE(isFile(TEST_DATA_BUILDDIR));
}
/// in the sysrepo datastore by calling Session::getData(). It should be
/// used sparingly in production code. It is primarily meant for unit tests.
///
- /// @param xpath the xpath of the root node belonging to the the tree being traversed
+ /// @param xpath the xpath of the root node belonging to the tree being traversed
/// @param f the function to be called on the node itself and each descendant
template <typename functor_t>
void forAll(std::string const& xpath, functor_t f) const {
CLEANFILES = *.gcno *.gcda
DISTCLEANFILES = path_replacer.sh
-
-if GENERATE_DOCS
-
-endif