mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[4523] Fixed multiple nits for DOCSIS ORO tests.
- Configuration 0 -> Configuration 7 (copy-paste error) - Invalid indentation of the vendor sub options data config - Remove redundant config-file option definition - OptionVentor -> OptionVendor - Rename requestDocsisORORenew test to docsisORO - Copyright date updated in rebind test
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -232,24 +232,18 @@ const char* REBIND_CONFIGS[] = {
|
|||||||
" } ],"
|
" } ],"
|
||||||
"\"valid-lifetime\": 4000 }",
|
"\"valid-lifetime\": 4000 }",
|
||||||
|
|
||||||
// Configuration 0
|
// Configuration 7
|
||||||
"{ \"interfaces-config\": {"
|
"{ \"interfaces-config\": {"
|
||||||
" \"interfaces\": [ \"*\" ]"
|
" \"interfaces\": [ \"*\" ]"
|
||||||
"},"
|
"},"
|
||||||
"\"preferred-lifetime\": 3000,"
|
"\"preferred-lifetime\": 3000,"
|
||||||
"\"rebind-timer\": 2000, "
|
"\"rebind-timer\": 2000, "
|
||||||
"\"renew-timer\": 1000, "
|
"\"renew-timer\": 1000, "
|
||||||
" \"option-def\": [ {"
|
"\"option-data\": [ {"
|
||||||
" \"name\": \"config-file\","
|
" \"name\": \"config-file\","
|
||||||
" \"code\": 33,"
|
" \"space\": \"vendor-4491\","
|
||||||
" \"type\": \"string\","
|
" \"data\": \"normal_erouter_v6.cm\""
|
||||||
" \"space\": \"vendor-4491\""
|
"}],"
|
||||||
" } ],"
|
|
||||||
" \"option-data\": [ {"
|
|
||||||
" \"name\": \"config-file\","
|
|
||||||
" \"space\": \"vendor-4491\","
|
|
||||||
" \"data\": \"normal_erouter_v6.cm\""
|
|
||||||
" }],"
|
|
||||||
"\"subnet6\": [ { "
|
"\"subnet6\": [ { "
|
||||||
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
|
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
|
||||||
" \"subnet\": \"2001:db8:1::/48\", "
|
" \"subnet\": \"2001:db8:1::/48\", "
|
||||||
@@ -992,7 +986,7 @@ TEST_F(RebindTest, docsisORO) {
|
|||||||
// Verify whether there is a vendor option.
|
// Verify whether there is a vendor option.
|
||||||
opt = client.config_.findOption(D6O_VENDOR_OPTS);
|
opt = client.config_.findOption(D6O_VENDOR_OPTS);
|
||||||
ASSERT_TRUE(opt);
|
ASSERT_TRUE(opt);
|
||||||
// The vendor option must be a OptionVentor object.
|
// The vendor option must be a OptionVendor object.
|
||||||
boost::shared_ptr<OptionVendor> vendor =
|
boost::shared_ptr<OptionVendor> vendor =
|
||||||
boost::dynamic_pointer_cast<OptionVendor>(opt);
|
boost::dynamic_pointer_cast<OptionVendor>(opt);
|
||||||
ASSERT_TRUE(vendor);
|
ASSERT_TRUE(vendor);
|
||||||
|
@@ -106,17 +106,11 @@ const char* RENEW_CONFIGS[] = {
|
|||||||
"\"preferred-lifetime\": 3000,"
|
"\"preferred-lifetime\": 3000,"
|
||||||
"\"rebind-timer\": 2000, "
|
"\"rebind-timer\": 2000, "
|
||||||
"\"renew-timer\": 1000, "
|
"\"renew-timer\": 1000, "
|
||||||
" \"option-def\": [ {"
|
"\"option-data\": [ {"
|
||||||
" \"name\": \"config-file\","
|
" \"name\": \"config-file\","
|
||||||
" \"code\": 33,"
|
" \"space\": \"vendor-4491\","
|
||||||
" \"type\": \"string\","
|
" \"data\": \"normal_erouter_v6.cm\""
|
||||||
" \"space\": \"vendor-4491\""
|
"}],"
|
||||||
" } ],"
|
|
||||||
" \"option-data\": [ {"
|
|
||||||
" \"name\": \"config-file\","
|
|
||||||
" \"space\": \"vendor-4491\","
|
|
||||||
" \"data\": \"normal_erouter_v6.cm\""
|
|
||||||
" }],"
|
|
||||||
"\"subnet6\": [ { "
|
"\"subnet6\": [ { "
|
||||||
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
|
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
|
||||||
" \"subnet\": \"2001:db8:1::/48\", "
|
" \"subnet\": \"2001:db8:1::/48\", "
|
||||||
@@ -407,7 +401,7 @@ TEST_F(RenewTest, requestAddressInRenewHint) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This test verifies that the client can request the DOCSIS sub-options.
|
// This test verifies that the client can request the DOCSIS sub-options.
|
||||||
TEST_F(RenewTest, requestDocsisORORenew) {
|
TEST_F(RenewTest, docsisORO) {
|
||||||
Dhcp6Client client;
|
Dhcp6Client client;
|
||||||
|
|
||||||
// Configure client to request IA_NA.
|
// Configure client to request IA_NA.
|
||||||
@@ -463,7 +457,7 @@ TEST_F(RenewTest, requestDocsisORORenew) {
|
|||||||
opt = client.config_.findOption(D6O_VENDOR_OPTS);
|
opt = client.config_.findOption(D6O_VENDOR_OPTS);
|
||||||
ASSERT_TRUE(opt);
|
ASSERT_TRUE(opt);
|
||||||
|
|
||||||
// The vendor option must be a OptionVentor object.
|
// The vendor option must be a OptionVendor object.
|
||||||
boost::shared_ptr<OptionVendor> vendor =
|
boost::shared_ptr<OptionVendor> vendor =
|
||||||
boost::dynamic_pointer_cast<OptionVendor>(opt);
|
boost::dynamic_pointer_cast<OptionVendor>(opt);
|
||||||
ASSERT_TRUE(vendor);
|
ASSERT_TRUE(vendor);
|
||||||
|
Reference in New Issue
Block a user