Commit 1f0c2a12 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3571] Address review comments.

Corrected mixed up use of DHCPv4 vs DHCPv6 and the
dhcp4 vs dhcp6 option space names.
parent d6c71571
...@@ -515,7 +515,7 @@ TEST(HostTest, addOptions4) { ...@@ -515,7 +515,7 @@ TEST(HostTest, addOptions4) {
} }
// Add 7 options to another option space. The option codes partially overlap // Add 7 options to another option space. The option codes partially overlap
// with option codes that we have added to dhcp6 option space. // with option codes that we have added to dhcp4 option space.
for (uint16_t code = 105; code < 112; ++code) { for (uint16_t code = 105; code < 112; ++code) {
OptionPtr option(new Option(Option::V4, code, OptionBuffer(10, 0xFF))); OptionPtr option(new Option(Option::V4, code, OptionBuffer(10, 0xFF)));
ASSERT_NO_THROW(host.getCfgOption4()->add(option, false, "isc")); ASSERT_NO_THROW(host.getCfgOption4()->add(option, false, "isc"));
...@@ -532,14 +532,14 @@ TEST(HostTest, addOptions4) { ...@@ -532,14 +532,14 @@ TEST(HostTest, addOptions4) {
ASSERT_TRUE(options6); ASSERT_TRUE(options6);
EXPECT_TRUE(options6->empty()); EXPECT_TRUE(options6->empty());
// Also make sure that for dhcp6 option space no DHCPv4 options are // Also make sure that for dhcp4 option space no DHCPv6 options are
// returned. This is to check that containers for DHCPv4 and DHCPv6 // returned. This is to check that containers for DHCPv4 and DHCPv6
// options do not share information. // options do not share information.
options6 = host.getCfgOption6()->getAll("dhcp4"); options6 = host.getCfgOption6()->getAll("dhcp4");
ASSERT_TRUE(options6); ASSERT_TRUE(options6);
EXPECT_TRUE(options6->empty()); EXPECT_TRUE(options6->empty());
// Validate codes of options added to dhcp6 option space. // Validate codes of options added to dhcp4 option space.
uint16_t expected_code = 100; uint16_t expected_code = 100;
for (OptionContainer::const_iterator option_desc = options->begin(); for (OptionContainer::const_iterator option_desc = options->begin();
option_desc != options->end(); ++option_desc) { option_desc != options->end(); ++option_desc) {
...@@ -590,7 +590,7 @@ TEST(HostTest, addOptions6) { ...@@ -590,7 +590,7 @@ TEST(HostTest, addOptions6) {
ASSERT_TRUE(options); ASSERT_TRUE(options);
ASSERT_EQ(10, options->size()); ASSERT_EQ(10, options->size());
// It should be possible to retrieve DHCPv6 options but the container // It should be possible to retrieve DHCPv4 options but the container
// should be empty. // should be empty.
OptionContainerPtr options4 = host.getCfgOption4()->getAll("dhcp4"); OptionContainerPtr options4 = host.getCfgOption4()->getAll("dhcp4");
ASSERT_TRUE(options4); ASSERT_TRUE(options4);
......
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