Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
1ebc34fa
Commit
1ebc34fa
authored
Oct 20, 2017
by
Marcin Siodelski
Browse files
[5393] Replace ASSERT_NE with EXPECT_NE and swapped values.
As a result of the review.
parent
e3a6262f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/tests/dora_unittest.cc
View file @
1ebc34fa
...
...
@@ -1702,7 +1702,7 @@ TEST_F(DORATest, changingCircuitId) {
ASSERT_EQ
(
DHCPOFFER
,
static_cast
<
int
>
(
resp
->
getType
()));
// Make sure that the client has been offerred a different address
// given that circuit-id is not used.
ASSERT_NE
(
resp
->
getYiaddr
().
toText
()
,
"10.0.0.9"
);
EXPECT_NE
(
"10.0.0.9"
,
resp
->
getYiaddr
().
toText
());
// Specify circuit-id matching the one in the configuration.
client
.
setCircuitId
(
"charter950"
);
...
...
@@ -1716,7 +1716,7 @@ TEST_F(DORATest, changingCircuitId) {
ASSERT_EQ
(
DHCPOFFER
,
static_cast
<
int
>
(
resp
->
getType
()));
// Make sure that the client has been offerred reserved address given that
// matching circuit-id has been specified.
ASSER
T_EQ
(
"10.0.0.9"
,
resp
->
getYiaddr
().
toText
());
EXPEC
T_EQ
(
"10.0.0.9"
,
resp
->
getYiaddr
().
toText
());
// Let's now change the circuit-id.
client
.
setCircuitId
(
"gdansk"
);
...
...
@@ -1728,7 +1728,7 @@ TEST_F(DORATest, changingCircuitId) {
ASSERT_TRUE
(
client
.
getContext
().
response_
);
resp
=
client
.
getContext
().
response_
;
// The client should be refused this address.
ASSER
T_EQ
(
DHCPNAK
,
static_cast
<
int
>
(
resp
->
getType
()));
EXPEC
T_EQ
(
DHCPNAK
,
static_cast
<
int
>
(
resp
->
getType
()));
// In this case, the client falls back to the 4-way exchange and should be
// allocated an address from the dynamic pool.
...
...
@@ -1738,7 +1738,7 @@ TEST_F(DORATest, changingCircuitId) {
resp
=
client
.
getContext
().
response_
;
// The client should be allocated some address.
ASSERT_EQ
(
DHCPACK
,
static_cast
<
int
>
(
resp
->
getType
()));
ASSERT_NE
(
client
.
config_
.
lease_
.
addr_
.
toText
()
,
"10.0.0.9"
);
EXPECT_NE
(
"10.0.0.9"
,
client
.
config_
.
lease_
.
addr_
.
toText
());
}
// Starting tests which require MySQL backend availability. Those tests
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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