Skip to content

Commit 2637ca5

Browse files
committed
[#3793] Fixed getVersion tests
1 parent a8833e1 commit 2637ca5

6 files changed

+24
-24
lines changed

src/bin/d2/tests/d2_command_unittest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,12 @@ TEST_F(CtrlChannelD2Test, getversion) {
583583
sendUnixCommand("{ \"command\": \"version-get\" }", response);
584584
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
585585
EXPECT_TRUE(response.find("log4cplus") != string::npos);
586-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
586+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
587587

588588
// Send the build-report command.
589589
sendUnixCommand("{ \"command\": \"build-report\" }", response);
590590
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
591-
EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
591+
EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
592592
}
593593

594594
// Tests that the server properly responds to list-commands command.

src/bin/d2/tests/d2_http_command_unittest.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -747,12 +747,12 @@ BaseCtrlChannelD2Test::testGetVersion() {
747747
sendHttpCommand("{ \"command\": \"version-get\" }", response);
748748
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
749749
EXPECT_TRUE(response.find("log4cplus") != string::npos);
750-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
750+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
751751

752752
// Send the build-report command.
753753
sendHttpCommand("{ \"command\": \"build-report\" }", response);
754754
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
755-
EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
755+
EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
756756
}
757757

758758
TEST_F(HttpCtrlChannelD2Test, getVersion) {
@@ -1883,13 +1883,13 @@ TEST_F(HttpCtrlChannelD2Test, dualStack) {
18831883
sendHttpCommand("{ \"command\": \"version-get\" }", response);
18841884
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
18851885
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1886-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1886+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
18871887

18881888
// Send the version-get command
18891889
sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
18901890
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
18911891
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1892-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1892+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
18931893
}
18941894

18951895
// Verify that the dual stack scenario works as expect.
@@ -1950,13 +1950,13 @@ TEST_F(HttpsCtrlChannelD2Test, dualStack) {
19501950
sendHttpCommand("{ \"command\": \"version-get\" }", response);
19511951
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
19521952
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1953-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1953+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
19541954

19551955
// Send the version-get command
19561956
sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
19571957
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
19581958
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1959-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1959+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
19601960
}
19611961

19621962
// This test verifies that the server signals timeout if the transmission

src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,12 +1098,12 @@ TEST_F(CtrlChannelDhcpv4SrvTest, getVersion) {
10981098
sendUnixCommand("{ \"command\": \"version-get\" }", response);
10991099
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
11001100
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1101-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1101+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
11021102

11031103
// Send the build-report command
11041104
sendUnixCommand("{ \"command\": \"build-report\" }", response);
11051105
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
1106-
EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
1106+
EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
11071107
}
11081108

11091109
// This test verifies that the DHCP server handles server-tag-get command

src/bin/dhcp4/tests/http_control_socket_unittest.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,12 +1768,12 @@ BaseCtrlChannelDhcpv4Test::testGetVersion() {
17681768
sendHttpCommand("{ \"command\": \"version-get\" }", response);
17691769
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
17701770
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1771-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1771+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
17721772

17731773
// Send the build-report command
17741774
sendHttpCommand("{ \"command\": \"build-report\" }", response);
17751775
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
1776-
EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
1776+
EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
17771777
}
17781778

17791779
TEST_F(HttpCtrlChannelDhcpv4Test, getVersion) {
@@ -3291,13 +3291,13 @@ TEST_F(HttpCtrlChannelDhcpv4Test, dualStack) {
32913291
sendHttpCommand("{ \"command\": \"version-get\" }", response);
32923292
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
32933293
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3294-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
3294+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
32953295

32963296
// Send the version-get command
32973297
sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
32983298
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
32993299
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3300-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
3300+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
33013301

33023302
// Clean up after the test.
33033303
CfgMgr::instance().clear();
@@ -3355,13 +3355,13 @@ TEST_F(HttpsCtrlChannelDhcpv4Test, dualStack) {
33553355
sendHttpCommand("{ \"command\": \"version-get\" }", response);
33563356
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
33573357
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3358-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);;
3358+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);;
33593359

33603360
// Send the version-get command
33613361
sendHttpCommand("{ \"command\": \"version-get\" }", response, "::1");
33623362
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
33633363
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3364-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
3364+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
33653365

33663366
// Clean up after the test.
33673367
CfgMgr::instance().clear();

src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,12 +1118,12 @@ TEST_F(CtrlChannelDhcpv6SrvTest, getVersion) {
11181118
sendUnixCommand("{ \"command\": \"version-get\" }", response);
11191119
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
11201120
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1121-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1121+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
11221122

11231123
// Send the build-report command
11241124
sendUnixCommand("{ \"command\": \"build-report\" }", response);
11251125
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
1126-
EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
1126+
EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
11271127
}
11281128

11291129
// This test verifies that the DHCP server handles server-tag-get command

src/bin/dhcp6/tests/http_control_socket_unittest.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,12 +1777,12 @@ BaseCtrlChannelDhcpv6Test::testGetVersion() {
17771777
sendHttpCommand("{ \"command\": \"version-get\" }", response);
17781778
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
17791779
EXPECT_TRUE(response.find("log4cplus") != string::npos);
1780-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
1780+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
17811781

17821782
// Send the build-report command
17831783
sendHttpCommand("{ \"command\": \"build-report\" }", response);
17841784
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
1785-
EXPECT_TRUE(response.find("GTEST_VERSION") != string::npos);
1785+
EXPECT_TRUE(response.find("Hooks directory: ") != string::npos);
17861786
}
17871787

17881788
TEST_F(HttpCtrlChannelDhcpv6Test, getVersion) {
@@ -3303,13 +3303,13 @@ TEST_F(HttpCtrlChannelDhcpv6Test, dualStack) {
33033303
sendHttpCommand("{ \"command\": \"version-get\" }", response);
33043304
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
33053305
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3306-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
3306+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
33073307

33083308
// Send the version-get command
33093309
sendHttpCommand("{ \"command\": \"version-get\" }", response, "127.0.0.1");
33103310
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
33113311
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3312-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
3312+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
33133313

33143314
// Clean up after the test.
33153315
CfgMgr::instance().clear();
@@ -3367,13 +3367,13 @@ TEST_F(HttpsCtrlChannelDhcpv6Test, dualStack) {
33673367
sendHttpCommand("{ \"command\": \"version-get\" }", response);
33683368
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
33693369
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3370-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
3370+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
33713371

33723372
// Send the version-get command
33733373
sendHttpCommand("{ \"command\": \"version-get\" }", response, "127.0.0.1");
33743374
EXPECT_TRUE(response.find("\"result\": 0") != string::npos);
33753375
EXPECT_TRUE(response.find("log4cplus") != string::npos);
3376-
EXPECT_FALSE(response.find("GTEST_VERSION") != string::npos);
3376+
EXPECT_FALSE(response.find("Hooks directory: ") != string::npos);
33773377

33783378
// Clean up after the test.
33793379
CfgMgr::instance().clear();

0 commit comments

Comments
 (0)