+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
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\": [\"*\" ]"
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() + "," +
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\": [\"*\" ]"
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];