mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 07:25:18 +00:00
[#2815] Add unit tests
This commit is contained in:
@@ -687,6 +687,22 @@ TEST_F(CfgHostsTest, del6) {
|
|||||||
EXPECT_FALSE(host);
|
EXPECT_FALSE(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This test checks that false is returned for deleting the IPv4 host that
|
||||||
|
// doesn't exist.
|
||||||
|
TEST_F(CfgHostsTest, del4MissingHost) {
|
||||||
|
CfgHosts cfg;
|
||||||
|
EXPECT_FALSE(cfg.del4(SubnetID(42), Host::IdentifierType::IDENT_DUID,
|
||||||
|
&duids_[0]->getDuid()[0], duids_[0]->getDuid().size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// This test checks that false is returned for deleting the IPv6 host that
|
||||||
|
// doesn't exist.
|
||||||
|
TEST_F(CfgHostsTest, del6MissingHost) {
|
||||||
|
CfgHosts cfg;
|
||||||
|
EXPECT_FALSE(cfg.del6(SubnetID(42), Host::IdentifierType::IDENT_DUID,
|
||||||
|
&duids_[0]->getDuid()[0], duids_[0]->getDuid().size()));
|
||||||
|
}
|
||||||
|
|
||||||
// This test checks that all reservations for the specified IPv4 subnet can
|
// This test checks that all reservations for the specified IPv4 subnet can
|
||||||
// be deleted.
|
// be deleted.
|
||||||
TEST_F(CfgHostsTest, deleteAll4) {
|
TEST_F(CfgHostsTest, deleteAll4) {
|
||||||
|
Reference in New Issue
Block a user