From 4b19e82a6120a8b1712e2c6d2fe9209251ae783c Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Wed, 5 Nov 2025 13:06:21 +0200 Subject: [PATCH] [#3969] Softcode socket path in expected messages in NETCONF tests --- src/bin/netconf/tests/netconf_controller_unittests.cc | 5 +++-- src/bin/netconf/tests/netconf_unittests.cc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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 -- 2.47.3