summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp6/tests
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2020-08-03 17:37:32 +0200
committerFrancis Dupont <fdupont@isc.org>2020-08-05 13:58:29 +0200
commit01e10ceba18f1c2a1a96bedf1cee2b121e151555 (patch)
tree50e3e8faf600ad6ece97b1542d5cef6551752091 /src/bin/dhcp6/tests
parent[#1292] minor changes (diff)
downloadkea-01e10ceba18f1c2a1a96bedf1cee2b121e151555.tar.xz
kea-01e10ceba18f1c2a1a96bedf1cee2b121e151555.zip
[#1007] Replaced some option spaces
Diffstat (limited to 'src/bin/dhcp6/tests')
-rw-r--r--src/bin/dhcp6/tests/config_backend_unittest.cc7
-rw-r--r--src/bin/dhcp6/tests/config_parser_unittest.cc12
-rw-r--r--src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc5
3 files changed, 15 insertions, 9 deletions
diff --git a/src/bin/dhcp6/tests/config_backend_unittest.cc b/src/bin/dhcp6/tests/config_backend_unittest.cc
index 00a8da44cf..4a7b09c34a 100644
--- a/src/bin/dhcp6/tests/config_backend_unittest.cc
+++ b/src/bin/dhcp6/tests/config_backend_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2019-2020 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
@@ -348,14 +348,15 @@ TEST_F(Dhcp6CBTest, mergeOptions) {
// bootfile-url should come from the first config back end.
// (overwriting the original).
- OptionDescriptor found_opt = options->get("dhcp6", D6O_BOOTFILE_URL);
+ OptionDescriptor found_opt =
+ options->get(DHCP6_OPTION_SPACE, D6O_BOOTFILE_URL);
ASSERT_TRUE(found_opt.option_);
OptionStringPtr opstr = boost::dynamic_pointer_cast<OptionString>(found_opt.option_);
ASSERT_TRUE(opstr);
EXPECT_EQ("updated-boot-file", opstr->getValue());
// sol-maxt-rt should come from the original config
- found_opt = options->get("dhcp6", D6O_SOL_MAX_RT);
+ found_opt = options->get(DHCP6_OPTION_SPACE, D6O_SOL_MAX_RT);
ASSERT_TRUE(found_opt.option_);
OptionUint32Ptr opint = boost::dynamic_pointer_cast<OptionUint32>(found_opt.option_);
ASSERT_TRUE(opint);
diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc
index d508a277f9..c01ce50159 100644
--- a/src/bin/dhcp6/tests/config_parser_unittest.cc
+++ b/src/bin/dhcp6/tests/config_parser_unittest.cc
@@ -3584,7 +3584,8 @@ TEST_F(Dhcp6ParserTest, optionDataMultiplePools) {
Pool6Ptr pool6 = boost::dynamic_pointer_cast<Pool6>(pool);
ASSERT_TRUE(pool6);
- OptionContainerPtr options1 = pool6->getCfgOption()->getAll("dhcp6");
+ OptionContainerPtr options1 =
+ pool6->getCfgOption()->getAll(DHCP6_OPTION_SPACE);
ASSERT_EQ(1, options1->size());
// Get the search index. Index #1 is to search using option code.
@@ -3611,7 +3612,8 @@ TEST_F(Dhcp6ParserTest, optionDataMultiplePools) {
pool6 = boost::dynamic_pointer_cast<Pool6>(pool);
ASSERT_TRUE(pool6);
- OptionContainerPtr options2 = pool6->getCfgOption()->getAll("dhcp6");
+ OptionContainerPtr options2 =
+ pool6->getCfgOption()->getAll(DHCP6_OPTION_SPACE);
ASSERT_EQ(1, options2->size());
const OptionContainerTypeIndex& idx2 = options2->get<1>();
@@ -3632,7 +3634,8 @@ TEST_F(Dhcp6ParserTest, optionDataMultiplePools) {
pool6 = boost::dynamic_pointer_cast<Pool6>(pool);
ASSERT_TRUE(pool6);
- OptionContainerPtr options3 = pool6->getCfgOption()->getAll("dhcp6");
+ OptionContainerPtr options3 =
+ pool6->getCfgOption()->getAll(DHCP6_OPTION_SPACE);
ASSERT_EQ(1, options3->size());
const OptionContainerTypeIndex& idx3 = options3->get<1>();
@@ -3652,7 +3655,8 @@ TEST_F(Dhcp6ParserTest, optionDataMultiplePools) {
pool6 = boost::dynamic_pointer_cast<Pool6>(pool);
ASSERT_TRUE(pool6);
- OptionContainerPtr options4 = pool6->getCfgOption()->getAll("dhcp6");
+ OptionContainerPtr options4 =
+ pool6->getCfgOption()->getAll(DHCP6_OPTION_SPACE);
ASSERT_EQ(1, options4->size());
const OptionContainerTypeIndex& idx4 = options4->get<1>();
diff --git a/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
index 69fe15f0e8..5ae9b04ba2 100644
--- a/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
+++ b/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
@@ -715,7 +715,8 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configSet) {
CfgMgr::instance().getCurrentCfg()->getCfgSubnets6()->getAll();
EXPECT_EQ(1, subnets->size());
- OptionDefinitionPtr def = LibDHCP::getRuntimeOptionDef("dhcp6", 163);
+ OptionDefinitionPtr def =
+ LibDHCP::getRuntimeOptionDef(DHCP6_OPTION_SPACE, 163);
ASSERT_TRUE(def);
// Create a config with malformed subnet that should fail to parse.
@@ -744,7 +745,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configSet) {
subnets = CfgMgr::instance().getCurrentCfg()->getCfgSubnets6()->getAll();
EXPECT_EQ(1, subnets->size());
- def = LibDHCP::getRuntimeOptionDef("dhcp6", 163);
+ def = LibDHCP::getRuntimeOptionDef(DHCP6_OPTION_SPACE, 163);
ASSERT_TRUE(def);
// Create a valid config with two subnets and no command channel.