diff options
author | Marcin Siodelski <marcin@isc.org> | 2023-04-05 10:28:26 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2023-04-19 18:26:04 +0200 |
commit | 5abd6990ce0c98a2ffc35804e414e6a4633b93be (patch) | |
tree | 5e266fb73253c50defa5f7a8dd47598fd10386bc /src/lib/dhcpsrv/tests/flq_allocator_unittest.cc | |
parent | [#2823] Common methods for instantiating allocators (diff) | |
download | kea-5abd6990ce0c98a2ffc35804e414e6a4633b93be.tar.xz kea-5abd6990ce0c98a2ffc35804e414e6a4633b93be.zip |
[#2823] Config backend sets allocators
Diffstat (limited to 'src/lib/dhcpsrv/tests/flq_allocator_unittest.cc')
-rw-r--r-- | src/lib/dhcpsrv/tests/flq_allocator_unittest.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc b/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc index 5e60cf81b2..33ae382901 100644 --- a/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc +++ b/src/lib/dhcpsrv/tests/flq_allocator_unittest.cc @@ -41,6 +41,12 @@ public: } }; +// Test that the allocator returns the correct type. +TEST_F(FreeLeaseQueueAllocatorTest4, getType) { + FreeLeaseQueueAllocator alloc(Lease::TYPE_V4, subnet_); + EXPECT_EQ("flq", alloc.getType()); +} + // Test populating free DHCPv4 leases to the queue. TEST_F(FreeLeaseQueueAllocatorTest4, populateFreeAddressLeases) { FreeLeaseQueueAllocator alloc(Lease::TYPE_V4, subnet_); @@ -353,6 +359,12 @@ public: }; +// Test that the allocator returns the correct type. +TEST_F(FreeLeaseQueueAllocatorTest6, getType) { + FreeLeaseQueueAllocator alloc(Lease::TYPE_NA, subnet_); + EXPECT_EQ("flq", alloc.getType()); +} + // Test populating free DHCPv6 address leases to the queue. TEST_F(FreeLeaseQueueAllocatorTest6, populateFreeAddressLeases) { FreeLeaseQueueAllocator alloc(Lease::TYPE_NA, subnet_); |