summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp6/tests/dhcp6_client.cc
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2015-03-19 19:19:55 +0100
committerThomas Markwalder <tmark@isc.org>2015-03-19 19:19:55 +0100
commit57b308ffd5dcdc23a5b4c246756720b547d1b63a (patch)
tree28e3aca4163be44a9653a3cf46f012c6e502b4ac /src/bin/dhcp6/tests/dhcp6_client.cc
parent[3689] Revamped host reservation tests which involve FQDN (diff)
downloadkea-57b308ffd5dcdc23a5b4c246756720b547d1b63a.tar.xz
kea-57b308ffd5dcdc23a5b4c246756720b547d1b63a.zip
[3689] Added new host test file
Addressing more review comments... new file - host_unittest.cc contains Dhcp6Client based host reservation tests dhcp6_client.cc dhcp6_client.h added setDuid(str) method to allow duid to be set to specific value dhcp6_srv_unittest.cc - deleted host reservation tests, now in host_unittest.cc dhcp6_test_utils.cc dhcp6_test_utils.h deleted createHost6() method
Diffstat (limited to 'src/bin/dhcp6/tests/dhcp6_client.cc')
-rw-r--r--src/bin/dhcp6/tests/dhcp6_client.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/dhcp6/tests/dhcp6_client.cc b/src/bin/dhcp6/tests/dhcp6_client.cc
index 73720695a9..8f445ec882 100644
--- a/src/bin/dhcp6/tests/dhcp6_client.cc
+++ b/src/bin/dhcp6/tests/dhcp6_client.cc
@@ -426,6 +426,12 @@ Dhcp6Client::getLeasesByIAID(const uint32_t iaid) const {
}
void
+Dhcp6Client::setDUID(const std::string& str) {
+ DUID d = DUID::fromText(str);
+ duid_.reset(new DUID(d));
+}
+
+void
Dhcp6Client::modifyDUID() {
if (!duid_) {
duid_ = generateDUID(DUID::DUID_LLT);