]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1860] unit tests for lenient option parsing
authorAndrei Pavel <andrei@isc.org>
Tue, 18 May 2021 09:53:00 +0000 (12:53 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 19 May 2021 12:59:03 +0000 (15:59 +0300)
src/bin/dhcp4/tests/parser_unittest.cc
src/bin/dhcp6/tests/parser_unittest.cc
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc

index 6aa4fb54ec65ec4cc685e5f75dbfc6c45c2ef375..553fb10a1fd64ad82f9feb14ed52a9aa56735a3b 100644 (file)
@@ -294,7 +294,7 @@ TEST(ParserTest, file) {
     }
 }
 
-// This test loads the all-keys.json file and check global parameters.
+// This test loads the all-keys.json file and checks global parameters.
 TEST(ParserTest, globalParameters) {
     ConstElementPtr json;
     Parser4Context ctx;
index 1e7b0a8e30da326a65551b2ab2e90432fa1bf7ff..7301e18e135bea942f7f8a4c5083ef206c957d4e 100644 (file)
@@ -301,7 +301,7 @@ TEST(ParserTest, file) {
     }
 }
 
-// This test loads the all-keys.json file and check global parameters.
+// This test loads the all-keys.json file and checks global parameters.
 TEST(ParserTest, globalParameters) {
     ConstElementPtr json;
     Parser6Context ctx;
index 9cff76e64c14d1fe8562cfb837eaf33980c267b8..1ce9e2b446665a7c501edec78418919a72938401 100644 (file)
@@ -94,7 +94,8 @@ const SimpleKeywords SimpleParser4::GLOBAL4_PARAMETERS = {
     { "cache-max-age",                  Element::integer },
     { "ip-reservations-unique",         Element::boolean },
     { "ddns-update-on-renew",           Element::boolean },
-    { "ddns-use-conflict-resolution",   Element::boolean }
+    { "ddns-use-conflict-resolution",   Element::boolean },
+    { "compatibility",                  Element::map },
 };
 
 /// @brief This table defines default global values for DHCPv4
index 69a6a957dd2ac1f4e49369aba9f04b7ca42ea4c4..e069fb64b8d4562fae4ff586370b0b18beb20744 100644 (file)
@@ -95,7 +95,8 @@ const SimpleKeywords SimpleParser6::GLOBAL6_PARAMETERS = {
     { "cache-max-age",                  Element::integer },
     { "ip-reservations-unique",         Element::boolean },
     { "ddns-update-on-renew",           Element::boolean },
-    { "ddns-use-conflict-resolution",   Element::boolean }
+    { "ddns-use-conflict-resolution",   Element::boolean },
+    { "compatibility",                  Element::map },
 };
 
 /// @brief This table defines default global values for DHCPv6