Commit 04ccb188 authored by Thomas Markwalder's avatar Thomas Markwalder

[#104,!290] Addressed review comments

parent f5fe96c6
......@@ -972,9 +972,7 @@ void
ControlledDhcpv4Srv::cbFetchUpdates(const SrvConfigPtr& srv_cfg,
boost::shared_ptr<unsigned> failure_count) {
try {
// The true value indicates that the server should not reconnect
// to the configuration backends and should take into account
// audit entries stored in the database since last fetch.
// Fetch any configuration backend updates since our last fetch.
server_->getCBControl()->databaseConfigFetch(srv_cfg,
CBControlDHCPv4::FetchMode::FETCH_UPDATE);
(*failure_count) = 0;
......
......@@ -77,10 +77,12 @@ public:
/// @brief Stub implementation of the "fetch" function.
///
/// It checks if the @c fetch_updates_only is set to true when it
/// is a later than first invocation of the function. It also
/// throws an exception when desired by a test, to verify that the
/// server gracefully handles such exception.
/// If this is not the first invocation of this function, it
/// verifies that the @c fetch_mode has been correctly set to
/// @c FetchMode::FETCH_UPDATE.
///
/// It also throws an exception when desired by a test, to
/// verify that the server gracefully handles such exception.
///
/// @param fetch_mode value indicating if the method is called upon the
/// server start up or it is called to fetch configuration updates.
......
......@@ -994,9 +994,7 @@ void
ControlledDhcpv6Srv::cbFetchUpdates(const SrvConfigPtr& srv_cfg,
boost::shared_ptr<unsigned> failure_count) {
try {
// The true value indicates that the server should not reconnect
// to the configuration backends and should take into account
// audit entries stored in the database since last fetch.
// Fetch any configuration backend updates since our last fetch.
server_->getCBControl()->databaseConfigFetch(srv_cfg,
CBControlDHCPv6::FetchMode::FETCH_UPDATE);
(*failure_count) = 0;
......
......@@ -162,7 +162,7 @@ public:
// This test verifies that externally configured globals are
// merged correctly into staging configuration.
TEST_F(Dhcp6CBTest, mergeGlobals) {
TEST_F(Dhcp6CBTest, DISABLED_mergeGlobals) {
string base_config =
"{ \n"
" \"interfaces-config\": { \n"
......@@ -230,10 +230,9 @@ TEST_F(Dhcp6CBTest, mergeGlobals) {
ASSERT_NO_FATAL_FAILURE(checkConfiguredGlobal(staging_cfg, renew_timer));
}
#if 0
// This test verifies that externally configured option definitions
// merged correctly into staging configuration.
TEST_F(Dhcp6CBTest, mergeOptionDefs) {
TEST_F(Dhcp6CBTest, DISABLED_mergeOptionDefs) {
string base_config =
"{ \n"
" \"option-def\": [ { \n"
......@@ -309,7 +308,7 @@ TEST_F(Dhcp6CBTest, mergeOptionDefs) {
// This test verifies that externally configured options
// merged correctly into staging configuration.
TEST_F(Dhcp6CBTest, mergeOptions) {
TEST_F(Dhcp6CBTest, DISABLED_mergeOptions) {
string base_config =
"{ \n"
" \"option-data\": [ { \n"
......@@ -387,7 +386,7 @@ TEST_F(Dhcp6CBTest, mergeOptions) {
// This test verifies that externally configured shared-networks are
// merged correctly into staging configuration.
TEST_F(Dhcp6CBTest, mergeSharedNetworks) {
TEST_F(Dhcp6CBTest, DISABLED_mergeSharedNetworks) {
string base_config =
"{ \n"
" \"interfaces-config\": { \n"
......@@ -447,7 +446,7 @@ TEST_F(Dhcp6CBTest, mergeSharedNetworks) {
// This test verifies that externally configured subnets are
// merged correctly into staging configuration.
TEST_F(Dhcp6CBTest, mergeSubnets) {
TEST_F(Dhcp6CBTest, DISABLED_mergeSubnets) {
string base_config =
"{ \n"
" \"interfaces-config\": { \n"
......@@ -505,6 +504,5 @@ TEST_F(Dhcp6CBTest, mergeSubnets) {
staged_subnet = subnets->getSubnet(3);
ASSERT_FALSE(staged_subnet);
}
#endif
}
......@@ -74,10 +74,12 @@ public:
/// @brief Stub implementation of the "fetch" function.
///
/// It checks if the @c fetch_updates_only is set to true when it
/// is a later than first invocation of the function. It also
/// throws an exception when desired by a test, to verify that the
/// server gracefully handles such exception.
/// If this is not the first invocation of this function, it
/// verifies that the @c fetch_mode has been correctly set to
/// @c FetchMode::FETCH_UPDATE.
///
/// It also throws an exception when desired by a test, to
/// verify that the server gracefully handles such exception.
///
/// @param fetch_mode value indicating if the method is called upon the
/// server start up or it is called to fetch configuration updates.
......
......@@ -287,6 +287,7 @@ libkea_dhcpsrv_include_HEADERS = \
callout_handle_store.h \
cb_ctl_dhcp.h \
cb_ctl_dhcp4.h \
cb_ctl_dhcp6.h \
cfg_4o6.h \
cfg_consistency.h \
cfg_db_access.h \
......
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