diff options
author | Thomas Markwalder <tmark@isc.org> | 2016-10-28 20:20:05 +0200 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2016-10-28 20:20:05 +0200 |
commit | 9b19d7745f9e5e7e18be9fcba915ede2761993ce (patch) | |
tree | bc3ae14b95c8e49164c7d4664d144134e9e83d79 /src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc | |
parent | [5058] Added unit test to check loading declined leases from CSV file (diff) | |
download | kea-9b19d7745f9e5e7e18be9fcba915ede2761993ce.tar.xz kea-9b19d7745f9e5e7e18be9fcba915ede2761993ce.zip |
[5058] CSVLeaseFile4 now properly loads declined leases
src/lib/dhcpsrv/csv_lease_file4.cc
CSVLeaseFile4::next() - modified to produce a read error
if the hardware address is empty and the lease state
is NOT declined.
CSVLeaseFile4::readHWAddr() - no longer throws an exception
if the hardware address is empty
src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc
Changed test lease data so invalid records do not
have lease state of declined
Diffstat (limited to 'src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc')
-rw-r--r-- | src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc b/src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc index 4b9393d814..7b030eb47d 100644 --- a/src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc +++ b/src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc @@ -181,7 +181,7 @@ TEST_F(LeaseFileLoaderTest, loadWrite4) { "100,135,7,0,0,,1\n"; std::string c_1 = "192.0.2.3,,a:11:01:04," - "200,200,8,1,1,host.example.com,1\n"; + "200,200,8,1,1,host.example.com,0\n"; // Create lease file with leases for 192.0.2.1, 192.0.3.15. The lease // entry for the 192.0.2.3 is invalid (lacks HW address) and should @@ -427,7 +427,7 @@ TEST_F(LeaseFileLoaderTest, loadMaxErrors) { std::string a_2 = "192.0.2.1,06:07:08:09:0a:bc,," "200,500,8,1,1,host.example.com,1\n"; - std::string b_1 = "192.0.2.3,,a:11:01:04,200,200,8,1,1,host.example.com,1\n"; + std::string b_1 = "192.0.2.3,,a:11:01:04,200,200,8,1,1,host.example.com,0\n"; std::string c_1 = "192.0.2.10,01:02:03:04:05:06,,200,300,8,1,1,,1\n"; |