2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

[#3477] Aligned v4 and v6 unit test files

This commit is contained in:
Francis Dupont 2024-07-30 18:01:25 +02:00
parent 8c5829d7d9
commit 2933828f8c
3 changed files with 9 additions and 8 deletions

View File

@ -811,9 +811,10 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configSet) {
// Verify the control channel socket no longer exists.
EXPECT_FALSE(fileExists(socket_path_));
// With no command channel, should still receive the response. The config contains random
// socket name (/tmp/kea-<value-changing-each-time>/kea4.sock), so the
// hash will be different each time. As such, we can do simplified checks:
// With no command channel, should still receive the response.
// The config contains random socket name
// (/tmp/kea-<value-changing-each-time>/kea4.sock), so the hash will
// be different each time. As such, we can do simplified checks:
// - verify the "result": 0 is there
// - verify the "text": "Configuration successful." is there
EXPECT_NE(response.find("\"result\": 0"), std::string::npos);
@ -868,7 +869,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configHashGet) {
int status;
ConstElementPtr args = parseAnswer(status, rsp);
EXPECT_EQ(CONTROL_RESULT_SUCCESS, status);
// the parseAnswer is trying to be smart with ignoring hash.
// The parseAnswer is trying to be smart with ignoring hash.
// But this time we really want to see the hash, so we'll retrieve
// the arguments manually.
args = rsp->get(CONTROL_ARGUMENTS);

View File

@ -263,7 +263,7 @@ public:
/// @param response_str a string containing the whole HTTP
/// response received.
///
/// @return An HttpResponse constructed from parsing the response string.
/// @return An HttpResponse constructed by parsing the response string.
HttpResponsePtr parseResponse(const std::string response_str) {
HttpResponsePtr hr(new HttpResponse());
HttpResponseParser parser(*hr);
@ -299,8 +299,8 @@ public:
ASSERT_TRUE(client);
// Send the command. This will trigger server's handler which receives
// data over the HTTP socket. The server will start sending
// response to the client.
// data over the HTTP socket. The server will start sending response
// to the client.
ASSERT_NO_THROW(client->startRequest(buildPostStr(command)));
runIOService();
ASSERT_TRUE(client->receiveDone());

View File

@ -726,7 +726,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configSet) {
EXPECT_FALSE(fileExists(socket_path_));
// With no command channel, should still receive the response.
// The config contains random socket name socket name
// The config contains random socket name
// (/tmp/kea-<value-changing-each-time>/kea6.sock), so the hash will
// be different each time. As such, we can do simplified checks:
// - verify the "result": 0 is there