diff options
author | Marcin Siodelski <marcin@isc.org> | 2015-03-10 21:36:08 +0100 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2015-03-10 21:36:08 +0100 |
commit | 587363708b140482a0e7924d78ce26bf9cddd3dc (patch) | |
tree | d589aadddd9a8e542380539fbf0eb7c6f321c949 /src/bin/dhcp4/tests/fqdn_unittest.cc | |
parent | [3688] DHCPv4 server assignes reserved hostname to the clients. (diff) | |
download | kea-587363708b140482a0e7924d78ce26bf9cddd3dc.tar.xz kea-587363708b140482a0e7924d78ce26bf9cddd3dc.zip |
[3688] Pass DHCPv4Exchange objects instead of query/resp in the dhcpv4_srv.
Diffstat (limited to 'src/bin/dhcp4/tests/fqdn_unittest.cc')
-rw-r--r-- | src/bin/dhcp4/tests/fqdn_unittest.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/dhcp4/tests/fqdn_unittest.cc b/src/bin/dhcp4/tests/fqdn_unittest.cc index 8b32169562..1257e46820 100644 --- a/src/bin/dhcp4/tests/fqdn_unittest.cc +++ b/src/bin/dhcp4/tests/fqdn_unittest.cc @@ -309,12 +309,13 @@ public: answer.reset(new Pkt4(DHCPACK, 1234)); } - ASSERT_NO_THROW(srv_->processClientName(query, answer)); + DHCPv4Exchange ex = createExchange(query); + ASSERT_NO_THROW(srv_->processClientName(ex)); - Option4ClientFqdnPtr fqdn = getClientFqdnOption(answer); + Option4ClientFqdnPtr fqdn = getClientFqdnOption(ex.getResponse()); ASSERT_TRUE(fqdn); - checkFqdnFlags(answer, exp_flags); + checkFqdnFlags(ex.getResponse(), exp_flags); EXPECT_EQ(exp_domain_name, fqdn->getDomainName()); EXPECT_EQ(exp_domain_type, fqdn->getDomainNameType()); @@ -358,9 +359,10 @@ public: answer.reset(new Pkt4(DHCPACK, 1234)); } - srv_->processClientName(query, answer); + DHCPv4Exchange ex = createExchange(query); + srv_->processClientName(ex); - OptionStringPtr hostname = getHostnameOption(answer); + OptionStringPtr hostname = getHostnameOption(ex.getResponse()); return (hostname); } |