From: Razvan Becheriu Date: Fri, 27 Mar 2026 07:21:49 +0000 (+0200) Subject: [#4432] fix unit tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4cc0bf2fbd4c6673ddebb60c3d3e61d7646af62;p=thirdparty%2Fkea.git [#4432] fix unit tests --- diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index bb03705551..af9d3e5f16 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -419,7 +419,7 @@ public: // Socket name too long? bool const too_long(SocketPath::isTooLongFromConfig(json)); if (too_long) { - EXPECT_EQ(CONTROL_RESULT_ERROR, rcode); + EXPECT_EQ(CONTROL_RESULT_FATAL_ERROR, rcode); exp_error = "name too long"; EXPECT_NE(std::string::npos, text.find(exp_error)); return; diff --git a/src/bin/dhcp4/tests/get_config_unittest.cc b/src/bin/dhcp4/tests/get_config_unittest.cc index 8a9d0d62e9..c024e91d93 100644 --- a/src/bin/dhcp4/tests/get_config_unittest.cc +++ b/src/bin/dhcp4/tests/get_config_unittest.cc @@ -14655,7 +14655,7 @@ public: bool const too_long(SocketPath::isTooLongFromConfig(json)); if (too_long) { - EXPECT_EQ(CONTROL_RESULT_ERROR, rcode_); + EXPECT_EQ(CONTROL_RESULT_FATAL_ERROR, rcode_); string const exp_error("name too long"); string const error(comment_->stringValue()); EXPECT_NE(std::string::npos, error.find(exp_error)); diff --git a/src/bin/dhcp4/tests/get_config_unittest.cc.skel b/src/bin/dhcp4/tests/get_config_unittest.cc.skel index 832795911a..2f03dc546a 100644 --- a/src/bin/dhcp4/tests/get_config_unittest.cc.skel +++ b/src/bin/dhcp4/tests/get_config_unittest.cc.skel @@ -253,7 +253,7 @@ public: bool const too_long(SocketPath::isTooLongFromConfig(json)); if (too_long) { - EXPECT_EQ(CONTROL_RESULT_ERROR, rcode_); + EXPECT_EQ(CONTROL_RESULT_FATAL_ERROR, rcode_); string const exp_error("name too long"); string const error(comment_->stringValue()); EXPECT_NE(std::string::npos, error.find(exp_error)); diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc index f7cf1dbf08..f88283b271 100644 --- a/src/bin/dhcp6/tests/config_parser_unittest.cc +++ b/src/bin/dhcp6/tests/config_parser_unittest.cc @@ -505,7 +505,7 @@ public: // Socket name too long? bool const too_long(SocketPath::isTooLongFromConfig(json)); if (too_long) { - EXPECT_EQ(CONTROL_RESULT_ERROR, rcode); + EXPECT_EQ(CONTROL_RESULT_FATAL_ERROR, rcode); exp_error = "name too long"; EXPECT_NE(std::string::npos, text.find(exp_error)); return; diff --git a/src/bin/dhcp6/tests/get_config_unittest.cc b/src/bin/dhcp6/tests/get_config_unittest.cc index 01e83bf58f..b7a7259189 100644 --- a/src/bin/dhcp6/tests/get_config_unittest.cc +++ b/src/bin/dhcp6/tests/get_config_unittest.cc @@ -14973,7 +14973,7 @@ public: bool const too_long(SocketPath::isTooLongFromConfig(json)); if (too_long) { - EXPECT_EQ(CONTROL_RESULT_ERROR, rcode_); + EXPECT_EQ(CONTROL_RESULT_FATAL_ERROR, rcode_); string const exp_error("name too long"); string const error(comment_->stringValue()); EXPECT_NE(std::string::npos, error.find(exp_error)); diff --git a/src/bin/dhcp6/tests/get_config_unittest.cc.skel b/src/bin/dhcp6/tests/get_config_unittest.cc.skel index d6a5df4406..c384a510b1 100644 --- a/src/bin/dhcp6/tests/get_config_unittest.cc.skel +++ b/src/bin/dhcp6/tests/get_config_unittest.cc.skel @@ -253,8 +253,7 @@ public: bool const too_long(SocketPath::isTooLongFromConfig(json)); if (too_long) { - EXPECT_EQ(CONTROL_RESULT_ERROR, rcode_); - + EXPECT_EQ(CONTROL_RESULT_FATAL_ERROR, rcode_); string const exp_error("name too long"); string const error(comment_->stringValue()); EXPECT_NE(std::string::npos, error.find(exp_error));