]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3793] Fixed getVersion tests
authorFrancis Dupont <fdupont@isc.org>
Thu, 20 Mar 2025 13:53:31 +0000 (14:53 +0100)
committerFrancis Dupont <fdupont@isc.org>
Thu, 20 Mar 2025 13:53:31 +0000 (14:53 +0100)
src/bin/d2/tests/d2_command_unittest.cc
src/bin/d2/tests/d2_http_command_unittest.cc
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/http_control_socket_unittest.cc
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
src/bin/dhcp6/tests/http_control_socket_unittest.cc

index a63a505ce7e253457aec3536ec1f35f0ca7808fe..e638aa7e601384cb653eb32b52e6d4dffa9e4af1 100644 (file)
@@ -583,12 +583,12 @@ TEST_F(CtrlChannelD2Test, getversion) {
     sendUnixCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the build-report command.
     sendUnixCommand("{ \"command\": \"build-report\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
-    EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
 }
 
 // Tests that the server properly responds to list-commands command.
index 2a570669afc2c1cb144d88b6e7353652c1207c8d..6a93b12812bef0f7374151739e8b33fce332d7f1 100644 (file)
@@ -747,12 +747,12 @@ BaseCtrlChannelD2Test::testGetVersion() {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the build-report command.
     sendHttpCommand("{ \"command\": \"build-report\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
-    EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
 }
 
 TEST_F(HttpCtrlChannelD2Test, getVersion) {
@@ -1883,13 +1883,13 @@ TEST_F(HttpCtrlChannelD2Test, dualStack) {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the version-get command
     sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 }
 
 // Verify that the dual stack scenario works as expect.
@@ -1950,13 +1950,13 @@ TEST_F(HttpsCtrlChannelD2Test, dualStack) {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the version-get command
     sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 }
 
 // This test verifies that the server signals timeout if the transmission
index 0d0e51b5d87fa85b4ea2cd0e352dd734ebcc9828..4187c8cd72d1b7b64b2b1e6e9b894558cb549cb2 100644 (file)
@@ -1098,12 +1098,12 @@ TEST_F(CtrlChannelDhcpv4SrvTest, getVersion) {
     sendUnixCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the build-report command
     sendUnixCommand("{ \"command\": \"build-report\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
-    EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
 }
 
 // This test verifies that the DHCP server handles server-tag-get command
index 2279e08bee8358811757c36fcc2136189e915e5c..35053ef5a203a8d929d6bfe9302d78bfbcc7ab7b 100644 (file)
@@ -1768,12 +1768,12 @@ BaseCtrlChannelDhcpv4Test::testGetVersion() {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the build-report command
     sendHttpCommand("{ \"command\": \"build-report\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
-    EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
 }
 
 TEST_F(HttpCtrlChannelDhcpv4Test, getVersion) {
@@ -3291,13 +3291,13 @@ TEST_F(HttpCtrlChannelDhcpv4Test, dualStack) {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the version-get command
     sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Clean up after the test.
     CfgMgr::instance().clear();
@@ -3355,13 +3355,13 @@ TEST_F(HttpsCtrlChannelDhcpv4Test, dualStack) {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);;
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);;
 
     // Send the version-get command
     sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Clean up after the test.
     CfgMgr::instance().clear();
index 06e3edb0d01fef0f7391f0cfb0e89195d79a4aeb..3f5533261f357407e5b057e233ec8d9a0d61fcf6 100644 (file)
@@ -1118,12 +1118,12 @@ TEST_F(CtrlChannelDhcpv6SrvTest, getVersion) {
     sendUnixCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the build-report command
     sendUnixCommand("{ \"command\": \"build-report\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
-    EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
 }
 
 // This test verifies that the DHCP server handles server-tag-get command
index c81069688afecd2260c4c6af24705b4b6a8f3db5..96b5a28cdfdcd2c9645fb8386aae46410bfb9d58 100644 (file)
@@ -1777,12 +1777,12 @@ BaseCtrlChannelDhcpv6Test::testGetVersion() {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the build-report command
     sendHttpCommand("{ \"command\": \"build-report\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
-    EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
 }
 
 TEST_F(HttpCtrlChannelDhcpv6Test, getVersion) {
@@ -3303,13 +3303,13 @@ TEST_F(HttpCtrlChannelDhcpv6Test, dualStack) {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the version-get command
     sendHttpCommand("{ \"command\": \"version-get\" }", response, "127.0.0.1");
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Clean up after the test.
     CfgMgr::instance().clear();
@@ -3367,13 +3367,13 @@ TEST_F(HttpsCtrlChannelDhcpv6Test, dualStack) {
     sendHttpCommand("{ \"command\": \"version-get\" }", response);
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Send the version-get command
     sendHttpCommand("{ \"command\": \"version-get\" }", response, "127.0.0.1");
     EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
     EXPECT_TRUE(response.find("log4cplus") != string::npos);
-    EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
+    EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
 
     // Clean up after the test.
     CfgMgr::instance().clear();