-// Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
void
Dhcp4SrvD2Test::reset() {
+ CfgMgr::instance().clear();
+
std::string config = "{ \"interfaces-config\": {"
" \"interfaces\": [ \"*\" ]"
"},"
ElementPtr json = Element::fromJSON(config);
ConstElementPtr status;
- CfgMgr::instance().clear();
-
// Configure the server and make sure the config is accepted
EXPECT_NO_THROW(status = configureDhcp4Server(srv_, json));
ASSERT_TRUE(status);
} else {
ASSERT_EQ(1, rcode);
}
+
+ if (rcode == 0) {
+ CfgMgr::instance().commit();
+ }
}
// Tests ability to turn on and off ddns updates by submitting
-// Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
void
Dhcp6SrvD2Test::reset() {
+ CfgMgr::instance().clear();
+
std::string config = "{ \"interfaces-config\": {"
" \"interfaces\": [ \"*\" ]"
"},"
void
Dhcp6SrvD2Test::configure(const std::string& config, bool exp_result) {
- CfgMgr::instance().clear();
ElementPtr json = Element::fromJSON(config);
ConstElementPtr status;
} else {
ASSERT_EQ(1, rcode);
}
+
+ if (rcode == 0) {
+ CfgMgr::instance().commit();
+ }
}
// Tests ability to turn on and off ddns updates by submitting
CfgMgr::instance().getStagingCfg()->getCfgSubnets6()->add(subnet_);
CfgMgr::instance().commit();
+ // Enable D2.
+ enableD2();
+
// Allocate a lease.
testProcessMessage(DHCPV6_REQUEST, "myhost.example.com",
"myhost.example.com.");