]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3969] Softcode socket path in expected messages in NETCONF tests
authorAndrei Pavel <andrei@isc.org>
Wed, 5 Nov 2025 11:06:21 +0000 (13:06 +0200)
committerAndrei Pavel <andrei@isc.org>
Wed, 5 Nov 2025 13:01:01 +0000 (15:01 +0200)
src/bin/netconf/tests/netconf_controller_unittests.cc
src/bin/netconf/tests/netconf_unittests.cc

index 9fc505e66be0eed2fcdf36fc064c3068af361eec..0c6f6a096bb7759d1679fd0fb34a024157889579 100644 (file)
@@ -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
index e3848fe426ee9396f912a8d9a14d4b6d7ae5402f..ef6c5730d2c81e17f79d645d0611ebcf41b9f4fc 100644 (file)
@@ -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