summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/tests
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2023-04-19 16:08:11 +0200
committerMarcin Siodelski <marcin@isc.org>2023-04-19 18:27:25 +0200
commit0c30fc802cc84d85ca425f7aa417c3e69250590c (patch)
treec09de3e00cc1dbaec1ee205439a49073b0dc9ef2 /src/lib/dhcpsrv/tests
parent[#2823] Added ChangeLog for #2823 (diff)
downloadkea-0c30fc802cc84d85ca425f7aa417c3e69250590c.tar.xz
kea-0c30fc802cc84d85ca425f7aa417c3e69250590c.zip
[#2823] Addressed review comments
Diffstat (limited to 'src/lib/dhcpsrv/tests')
-rw-r--r--src/lib/dhcpsrv/tests/flq_allocator_unittest.cc7
-rw-r--r--src/lib/dhcpsrv/tests/iterative_allocator_unittest.cc7
-rw-r--r--src/lib/dhcpsrv/tests/random_allocator_unittest.cc7
3 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc b/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc
index 33ae382901..350106f11b 100644
--- a/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc
+++ b/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc
@@ -361,8 +361,11 @@ public:
// Test that the allocator returns the correct type.
TEST_F(FreeLeaseQueueAllocatorTest6, getType) {
- FreeLeaseQueueAllocator alloc(Lease::TYPE_NA, subnet_);
- EXPECT_EQ("flq", alloc.getType());
+ FreeLeaseQueueAllocator allocNA(Lease::TYPE_NA, subnet_);
+ EXPECT_EQ("flq", allocNA.getType());
+
+ FreeLeaseQueueAllocator allocPD(Lease::TYPE_PD, subnet_);
+ EXPECT_EQ("flq", allocPD.getType());
}
// Test populating free DHCPv6 address leases to the queue.
diff --git a/src/lib/dhcpsrv/tests/iterative_allocator_unittest.cc b/src/lib/dhcpsrv/tests/iterative_allocator_unittest.cc
index 3d28607e45..bde1805a11 100644
--- a/src/lib/dhcpsrv/tests/iterative_allocator_unittest.cc
+++ b/src/lib/dhcpsrv/tests/iterative_allocator_unittest.cc
@@ -119,8 +119,11 @@ using IterativeAllocatorTest6 = AllocEngine6Test;
// Test that the allocator returns the correct type.
TEST_F(IterativeAllocatorTest6, getType) {
- IterativeAllocator alloc(Lease::TYPE_NA, subnet_);
- EXPECT_EQ("iterative", alloc.getType());
+ IterativeAllocator allocNA(Lease::TYPE_NA, subnet_);
+ EXPECT_EQ("iterative", allocNA.getType());
+
+ IterativeAllocator allocPD(Lease::TYPE_PD, subnet_);
+ EXPECT_EQ("iterative", allocPD.getType());
}
// This test verifies that the allocator picks addresses that belong to the
diff --git a/src/lib/dhcpsrv/tests/random_allocator_unittest.cc b/src/lib/dhcpsrv/tests/random_allocator_unittest.cc
index 55fec78d2f..e8009eed3a 100644
--- a/src/lib/dhcpsrv/tests/random_allocator_unittest.cc
+++ b/src/lib/dhcpsrv/tests/random_allocator_unittest.cc
@@ -186,8 +186,11 @@ using RandomAllocatorTest6 = AllocEngine6Test;
// Test that the allocator returns the correct type.
TEST_F(RandomAllocatorTest6, getType) {
- RandomAllocator alloc(Lease::TYPE_NA, subnet_);
- EXPECT_EQ("random", alloc.getType());
+ RandomAllocator allocNA(Lease::TYPE_NA, subnet_);
+ EXPECT_EQ("random", allocNA.getType());
+
+ RandomAllocator allocPD(Lease::TYPE_PD, subnet_);
+ EXPECT_EQ("random", allocPD.getType());
}
// Test allocating IPv6 addresses when a subnet has a single pool.