]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3971] Updated parsers UTs
authorFrancis Dupont <fdupont@isc.org>
Mon, 11 May 2026 15:01:18 +0000 (17:01 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 22 May 2026 10:35:51 +0000 (12:35 +0200)
src/bin/dhcp4/tests/parser_unittest.cc
src/bin/dhcp6/tests/parser_unittest.cc

index f32112599f4b58011c8626bfe8c20429f639c810..fa18af7b8230216474511296b8d3773c5b6e08bc 100644 (file)
@@ -1045,22 +1045,6 @@ TEST(ParserTest, duplicateControlSocket) {
     Parser4Context ctx1;
     EXPECT_THROW(ctx1.parseString(bad1, Parser4Context::PARSER_DHCP4),
                  Dhcp4ParseError);
-
-    // Invalid configuration: both name and address.
-    string bad2(R"({
-    "Dhcp4": {
-        "control-socket": {
-            "socket-type": "http",
-            "socket-address": "127.0.0.1",
-            "socket-name": "::1"
-        }
-     }
-})");
-
-    ASSERT_NO_THROW(Element::fromJSON(bad2, true));
-    Parser4Context ctx2;
-    EXPECT_THROW(ctx2.parseString(bad2, Parser4Context::PARSER_DHCP4),
-                 Dhcp4ParseError);
 }
 
 }  // namespace test
index f6014fe414eb92db16cbbcec27e6fd3463b1bdbf..9dba07a6c44c71722cddd5641fe6380ee26c8fc2 100644 (file)
@@ -1035,22 +1035,6 @@ TEST(ParserTest, duplicateControlSocket) {
     Parser6Context ctx1;
     EXPECT_THROW(ctx1.parseString(bad1, Parser6Context::PARSER_DHCP6),
                  Dhcp6ParseError);
-
-    // Invalid configuration: both name and address.
-    string bad2(R"({
-    "Dhcp6": {
-        "control-socket": {
-            "socket-type": "http",
-            "socket-address": "::1",
-            "socket-name": "127.0.0.1"
-        }
-     }
-})");
-
-    ASSERT_NO_THROW(Element::fromJSON(bad2, true));
-    Parser6Context ctx2;
-    EXPECT_THROW(ctx2.parseString(bad2, Parser6Context::PARSER_DHCP6),
-                 Dhcp6ParseError);
 }
 
 }  // namespace test