]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3578] added ChangeLog entry
authorRazvan Becheriu <razvan@isc.org>
Thu, 26 Sep 2024 18:15:02 +0000 (21:15 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 30 Sep 2024 09:13:35 +0000 (12:13 +0300)
ChangeLog
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp6/tests/config_parser_unittest.cc

index bd68149ae42bcbc3ad96eb90ef5caf4c3847d176..5fd9cfad69ac3b9c11f8da04f80e37661bba2bea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2287.  [bug]           razvan
+       Fixed the serialization of 'retry-on-startup' database
+       configuration parameter as boolean instead of string.
+       (Gitlab #3578)
+
 Kea 2.7.3 (development) released on August 25, 2024
 
 2286.  [func]          fdupont
index b1c4658e71548ce50c5793a026f4f9a5d4b88cf7..fe2894b66869554fd08a86d7daa491ce16f27e53 100644 (file)
@@ -63,7 +63,7 @@ using namespace std;
 namespace {
 
 const char* PARSER_CONFIGS[] = {
-    // CONFIGURATION 0: one subnet with one pool, no user contexts
+    // Configuration 0: one subnet with one pool, no user contexts
     "{"
     "    \"interfaces-config\": {"
     "        \"interfaces\": [\"*\" ]"
@@ -889,9 +889,8 @@ TEST_F(Dhcp4ParserTest, emptyInterfaceConfig) {
     checkResult(status, 0);
 }
 
-/// The goal of this test is to verify if wrongly defined subnet will
-/// be rejected. Properly defined subnet must include at least one
-/// pool definition.
+/// The goal of this test is to verify if configuration without any
+/// subnets defined can be accepted.
 TEST_F(Dhcp4ParserTest, emptySubnet) {
 
     std::string config = "{ " + genIfaceConfig() + "," +
index 76d8a6ee24a3b88aec11013e6961e2524ed9e2d0..d60f09d8e86e14546641fa442b3b37809177b9b4 100644 (file)
@@ -67,7 +67,7 @@ using namespace std;
 namespace {
 
 const char* PARSER_CONFIGS[] = {
-    // CONFIGURATION 0: one subnet with one pool, no user contexts
+    // Configuration 0: one subnet with one pool, no user contexts
     "{"
     "    \"interfaces-config\": {"
     "        \"interfaces\": [\"*\" ]"
@@ -7699,6 +7699,24 @@ TEST_F(Dhcp6ParserTest, globalReservations) {
     EXPECT_EQ(11, static_cast<int>(opt_prf->getValue()));
 }
 
+// Rather than disable these tests they are compiled out.  This avoids them
+// reporting as disabled and thereby drawing attention to them.
+// This test verifies that configuration control with unsupported type fails
+TEST_F(Dhcp6ParserTest, configControlInfoNoFactory) {
+    string config = PARSER_CONFIGS[8];
+
+    // Unregister "mysql" and ignore the return value.
+    static_cast<void>(TestConfigBackendDHCPv6::
+                      unregisterBackendType(ConfigBackendDHCPv6Mgr::instance(),
+                                            "mysql"));
+
+    // Should fail because "type=mysql" has no factories.
+    configure(config, CONTROL_RESULT_ERROR,
+              "during update from config backend database: "
+              "The type of the configuration backend: "
+              "'mysql' is not supported");
+}
+
 // This test verifies that configuration control info gets populated.
 TEST_F(Dhcp6ParserTest, configControlInfo) {
     string config = PARSER_CONFIGS[8];