From: Andrei Pavel Date: Wed, 5 Nov 2025 11:06:21 +0000 (+0200) Subject: [#3969] Softcode socket path in expected messages in NETCONF tests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b19e82a6120a8b1712e2c6d2fe9209251ae783c;p=thirdparty%2Fkea.git [#3969] Softcode socket path in expected messages in NETCONF tests --- diff --git a/src/bin/netconf/tests/netconf_controller_unittests.cc b/src/bin/netconf/tests/netconf_controller_unittests.cc index 9fc505e66b..0c6f6a096b 100644 --- a/src/bin/netconf/tests/netconf_controller_unittests.cc +++ b/src/bin/netconf/tests/netconf_controller_unittests.cc @@ -206,8 +206,9 @@ TEST_F(NetconfControllerTest, sigtermShutdown) { TEST_F(NetconfControllerTest, badSocketPath) { time_duration elapsed_time; EXPECT_THROW_MSG(runWithConfig(bad_socket_name_config, 200, elapsed_time), ProcessInitError, - "Could Not load configuration file: invalid path specified: '/tmp', supported " - "path is '/opt/kea/var/run/kea'"); + string("Could Not load configuration file: invalid path specified: '/tmp', " + "supported path is '") + + UnixCommandConfig::getSocketPath() + "'"); } } // namespace diff --git a/src/bin/netconf/tests/netconf_unittests.cc b/src/bin/netconf/tests/netconf_unittests.cc index e3848fe426..ef6c5730d2 100644 --- a/src/bin/netconf/tests/netconf_unittests.cc +++ b/src/bin/netconf/tests/netconf_unittests.cc @@ -1198,7 +1198,8 @@ TEST_F(NetconfAgentTest, badSocketPath) { NetconfSimpleParser parser; NetconfConfigPtr ctx(new NetconfConfig()); EXPECT_THROW_MSG(parser.parse(ctx, json, false), SecurityError, - "invalid path specified: '/tmp', supported path is '/opt/kea/var/run/kea'"); + string("invalid path specified: '/tmp', supported path is '") + + UnixCommandConfig::getSocketPath() + "'"); } } // namespace