From: Razvan Becheriu Date: Thu, 19 Nov 2020 14:03:12 +0000 (+0200) Subject: [#1550] addressed comments X-Git-Tag: Kea-1.9.2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbeed7668b9496d14e50e835a503cf6b4c281f9b;p=thirdparty%2Fkea.git [#1550] addressed comments --- diff --git a/src/bin/dhcp4/tests/dora_unittest.cc b/src/bin/dhcp4/tests/dora_unittest.cc index ce2405a19f..4688e6e011 100644 --- a/src/bin/dhcp4/tests/dora_unittest.cc +++ b/src/bin/dhcp4/tests/dora_unittest.cc @@ -122,18 +122,18 @@ namespace { /// - Configuration 12: /// - Simple configuration with a single subnet /// - One in-pool reservation for MAC address aa:bb:cc:dd:ee:ff -/// - Host reservation mode set to ALL (fully enabled) +/// - The reservations-in-subnet set to true /// /// - Configuration 13: /// - Simple configuration with a single subnet as in #12 -/// - Host reservation mode set to "disabled" for testing that the +/// - The reservations-in-subnet set to false for testing that the /// reservations are ignored /// /// - Configuration 14: /// - Simple configuration with a single subnet -/// - Two host reservations, one out of the pool another one in pool -/// - Host reservation mode set to "out-of-pool" to test that -/// only out of pool reservations are honored. +/// - Two host reservations, one out of the pool, another one in pool +/// - The reservations-in-subnet and reservations-out-of-pool set to true +/// to test that only out of pool reservations are honored. /// /// - Configuration 15: /// - Use for testing authoritative flag @@ -1846,9 +1846,8 @@ TEST_F(DORATest, reservationIgnoredInDisabledMode) { Dhcp4Client client(Dhcp4Client::SELECTING); // Set MAC address which doesn't match the reservation configured. client.setHWAddress("11:22:33:44:55:66"); - // Configure DHCP server. In this configuration the reservation mode is - // set to disabled. Any client should be able to hijack the reserved - // address. + // Configure DHCP server. In this configuration the reservations flags are + // disabled. Any client should be able to hijack the reserved address. configure(DORA_CONFIGS[13], *client.getServer()); // Client requests the 10.0.0.65 address reserved for another client. ASSERT_NO_THROW(client.doDORA(boost::shared_ptr< @@ -1864,7 +1863,7 @@ TEST_F(DORATest, reservationIgnoredInDisabledMode) { } // This test verifies that in pool reservations are ignored when the -// reservation mode is set to "out-of-pool". +// reservations-out-of-pool is set to true. TEST_F(DORATest, reservationModeOutOfPool) { // Create the first client for which we have a reservation out of the // dynamic pool. @@ -1902,9 +1901,8 @@ TEST_F(DORATest, reservationModeOutOfPool) { ASSERT_EQ("10.0.0.40", clientB.config_.lease_.addr_.toText()); } -// This test verifies that the in-pool reservation can be assigned to -// the client not owning this reservation when the reservation mode is -// set to "out-of-pool". +// This test verifies that the in-pool reservation can be assigned to a client +// not owning this reservation when the reservations-out-of-pool flag is enabled. TEST_F(DORATest, reservationIgnoredInOutOfPoolMode) { // Create the first client for which we have a reservation out of the // dynamic pool. diff --git a/src/bin/dhcp6/tests/sarr_unittest.cc b/src/bin/dhcp6/tests/sarr_unittest.cc index ff1c1f1500..6de2e142f3 100644 --- a/src/bin/dhcp6/tests/sarr_unittest.cc +++ b/src/bin/dhcp6/tests/sarr_unittest.cc @@ -56,9 +56,9 @@ namespace { /// /// - Configuration 4: /// - Simple configuration with a single subnet -/// - Two host reservations, one out of the pool another one in pool -/// - Host reservation mode set to "out-of-pool" to test that -/// only out of pool reservations are honored. +/// - Two host reservations, one out of the pool, another one in pool +/// - The reservations-in-subnet and reservations-out-of-pool set to true +/// to test that only out of pool reservations are honored. /// const char* CONFIGS[] = { // Configuration 0 @@ -659,7 +659,7 @@ TEST_F(SARRTest, pkt6ReceiveDropStat3) { } // This test verifies that in pool reservations are ignored when the -// reservation mode is set to "out-of-pool". +// reservations-out-of-pool is set to true. TEST_F(SARRTest, reservationModeOutOfPool) { // Create the first client for which we have a reservation out of the // dynamic pool. @@ -694,9 +694,8 @@ TEST_F(SARRTest, reservationModeOutOfPool) { ASSERT_EQ("2001:db8:1::3", lease.addr_.toText()); } -// This test verifies that the in-pool reservation can be assigned to -// the client not owning this reservation when the reservation mode is -// set to "out-of-pool". +// This test verifies that the in-pool reservation can be assigned to a client +// not owning this reservation when the reservations-out-of-pool flag is enabled. TEST_F(SARRTest, reservationIgnoredInOutOfPoolMode) { // Create the first client for which we have a reservation out of the // dynamic pool.