diff options
author | Marcin Siodelski <marcin@isc.org> | 2015-10-06 16:52:25 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2015-10-06 16:52:25 +0200 |
commit | bbead46461687e1ff462842cd0daa34e94ef6d40 (patch) | |
tree | 365b29316ceab041519f9df5eda17d4e24c5a012 /src/lib | |
parent | [3974] Attached parser for expired leases processing to global parser. (diff) | |
download | kea-bbead46461687e1ff462842cd0daa34e94ef6d40.tar.xz kea-bbead46461687e1ff462842cd0daa34e94ef6d40.zip |
[3974] Small updates to the expiration parser tests.
As a result of the review.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc | 4 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/expiration_config_parser_unittest.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc b/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc index 86a1fc750a..5bb65afa06 100644 --- a/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc @@ -69,6 +69,10 @@ testAccessModify(const int64_t limit, const ModifierFun& modifier, // Setting the value to the maximum allowed - 1 should pass. ASSERT_NO_THROW(modifier(&cfg, limit - 1)); EXPECT_EQ(limit - 1, accessor(&cfg)); + + // Setting the value to 0 should pass. + ASSERT_NO_THROW(modifier(&cfg, 0)); + EXPECT_EQ(0, accessor(&cfg)); } /// @brief Tests that modifier and the accessor returning uint16_t value diff --git a/src/lib/dhcpsrv/tests/expiration_config_parser_unittest.cc b/src/lib/dhcpsrv/tests/expiration_config_parser_unittest.cc index f9da76ad3c..82f870aa36 100644 --- a/src/lib/dhcpsrv/tests/expiration_config_parser_unittest.cc +++ b/src/lib/dhcpsrv/tests/expiration_config_parser_unittest.cc @@ -140,6 +140,11 @@ ExpirationConfigParserTest::testOutOfRange(const std::string& param, addParam(param, max_value); EXPECT_NO_THROW(renderConfig()) << "test for in range value of '" << param << "' failed"; + + // Value of 0 should be accepted. + addParam(param, 0); + EXPECT_NO_THROW(renderConfig()) + << "test for zero value of '" << param << "' failed"; } |