Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
1f0c2a12
Commit
1f0c2a12
authored
Mar 11, 2016
by
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
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lib/dhcpsrv/tests/host_unittest.cc
View file @
1f0c2a12
...
...
@@ -515,7 +515,7 @@ TEST(HostTest, addOptions4) {
}
// Add 7 options to another option space. The option codes partially overlap
// with option codes that we have added to dhcp
6
option space.
// with option codes that we have added to dhcp
4
option space.
for
(
uint16_t
code
=
105
;
code
<
112
;
++
code
)
{
OptionPtr
option
(
new
Option
(
Option
::
V4
,
code
,
OptionBuffer
(
10
,
0xFF
)));
ASSERT_NO_THROW
(
host
.
getCfgOption4
()
->
add
(
option
,
false
,
"isc"
));
...
...
@@ -532,14 +532,14 @@ TEST(HostTest, addOptions4) {
ASSERT_TRUE
(
options6
);
EXPECT_TRUE
(
options6
->
empty
());
// Also make sure that for dhcp
6
option space no DHCPv
4
options are
// Also make sure that for dhcp
4
option space no DHCPv
6
options are
// returned. This is to check that containers for DHCPv4 and DHCPv6
// options do not share information.
options6
=
host
.
getCfgOption6
()
->
getAll
(
"dhcp4"
);
ASSERT_TRUE
(
options6
);
EXPECT_TRUE
(
options6
->
empty
());
// Validate codes of options added to dhcp
6
option space.
// Validate codes of options added to dhcp
4
option space.
uint16_t
expected_code
=
100
;
for
(
OptionContainer
::
const_iterator
option_desc
=
options
->
begin
();
option_desc
!=
options
->
end
();
++
option_desc
)
{
...
...
@@ -590,7 +590,7 @@ TEST(HostTest, addOptions6) {
ASSERT_TRUE
(
options
);
ASSERT_EQ
(
10
,
options
->
size
());
// It should be possible to retrieve DHCPv
6
options but the container
// It should be possible to retrieve DHCPv
4
options but the container
// should be empty.
OptionContainerPtr
options4
=
host
.
getCfgOption4
()
->
getAll
(
"dhcp4"
);
ASSERT_TRUE
(
options4
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment