From: Francis Dupont Date: Mon, 11 May 2026 15:01:18 +0000 (+0200) Subject: [#3971] Updated parsers UTs X-Git-Tag: Kea-3.1.9~39 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e58b22e31bc0ab531a6dffdefa5dfd540b94d0d9;p=thirdparty%2Fkea.git [#3971] Updated parsers UTs --- diff --git a/src/bin/dhcp4/tests/parser_unittest.cc b/src/bin/dhcp4/tests/parser_unittest.cc index f32112599f..fa18af7b82 100644 --- a/src/bin/dhcp4/tests/parser_unittest.cc +++ b/src/bin/dhcp4/tests/parser_unittest.cc @@ -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 diff --git a/src/bin/dhcp6/tests/parser_unittest.cc b/src/bin/dhcp6/tests/parser_unittest.cc index f6014fe414..9dba07a6c4 100644 --- a/src/bin/dhcp6/tests/parser_unittest.cc +++ b/src/bin/dhcp6/tests/parser_unittest.cc @@ -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