]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3477] Last fixes before 2.7.2
authorFrancis Dupont <fdupont@isc.org>
Tue, 30 Jul 2024 13:02:08 +0000 (15:02 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 1 Aug 2024 07:23:54 +0000 (09:23 +0200)
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
src/lib/config/http_command_config.h

index 90869db6aad75870ba46289a0ae1ff3aa596898b..e5bcc3a95c535c8c30643786d2fdb2b40febc24f 100644 (file)
@@ -225,11 +225,11 @@ public:
     /// If successful, it then sends the given command and retrieves the
     /// server's response.  Note that it polls the server's I/O service
     /// where needed to cause the server to process IO events on
-    /// the control channel sockets
+    /// the control channel sockets.
     ///
     /// @param command the command text to execute in JSON form
     /// @param response variable into which the received response should be
-    ///        placed.
+    /// placed.
     void sendUnixCommand(const string& command, string& response) {
         response = "";
         boost::scoped_ptr<UnixControlClient> client;
index 5736a0713f6a905f3b3fc1532e5c70d16a0ba99d..e1f2e699f394ad7240af67595459ac78404e42f1 100644 (file)
@@ -252,11 +252,11 @@ public:
     /// If successful, it then sends the given command and retrieves the
     /// server's response.  Note that it polls the server's I/O service
     /// where needed to cause the server to process IO events on
-    /// the control channel sockets
+    /// the control channel sockets.
     ///
     /// @param command the command text to execute in JSON form.
     /// @param response variable into which the received response should be
-    ///        placed.
+    /// placed.
     void sendHttpCommand(const string& command, string& response) {
         response = "";
         IOServicePtr io_service = getIOService();
index cab13a1758d75441a56bbedcc1573e48fe251609..d9017792032f6858249e302de2667806e61a8fa3 100644 (file)
@@ -312,12 +312,13 @@ public:
         EXPECT_EQ(1, cnt) << "Command " << command << " not found";
     }
 
-    /// @brief Check if the answer for write-config command is correct
+    /// @brief Check if the answer for write-config command is correct.
     ///
-    /// @param response_txt response in text form (as read from the control socket)
+    /// @param response_txt response in text form (as read from
+    /// the control socket)
     /// @param exp_status expected status (0 success, 1 failure)
     /// @param exp_txt for success cases this defines the expected filename,
-    ///                for failure cases this defines the expected error message
+    /// for failure cases this defines the expected error message.
     void checkConfigWrite(const std::string& response_txt, int exp_status,
                           const std::string& exp_txt = "") {
 
@@ -614,7 +615,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, controlChannelStats) {
     EXPECT_EQ("{ \"result\": 1, \"text\": \"No 'bogus' statistic found\" }",
               response);
 
-    // Check statistic-remove-all (deprecated).
+    // Check statistic-remove-all (deprecated)
 
     // Check statistic-sample-age-set
     sendUnixCommand("{ \"command\" : \"statistic-sample-age-set\", "
index c60e1af1539047bcca72db59f339c629aa1652bf..daee3a3b66b067c1263619de095122faa703f7a7 100644 (file)
@@ -405,12 +405,13 @@ public:
         EXPECT_EQ(1, cnt) << "Command " << command << " not found";
     }
 
-    /// @brief Check if the answer for write-config command is correct.
+    /// @brief Check if the answer for config-write command is correct.
     ///
-    /// @param response_txt response in text form (as read from the control socket)
+    /// @param response_txt response in text form (as read from
+    /// the control socket)
     /// @param exp_status expected status (0 success, 1 failure)
     /// @param exp_txt for success cases this defines the expected filename,
-    ///                for failure cases this defines the expected error message
+    /// for failure cases this defines the expected error message.
     void checkConfigWrite(const std::string& response_txt, int exp_status,
                           const std::string& exp_txt = "") {
 
@@ -619,7 +620,7 @@ TEST_F(HttpCtrlChannelDhcpv4Test, controlChannelStats) {
     EXPECT_EQ("[ { \"result\": 1, \"text\": \"No 'bogus' statistic found\" } ]",
               response);
 
-    // Check statistic-remove-all (deprecated).
+    // Check statistic-remove-all (deprecated)
 
     // Check statistic-sample-age-set
     sendHttpCommand("{ \"command\" : \"statistic-sample-age-set\", "
index 5e87c483e5177a7336cb9c999acbca82bc11d4ec..700995ce0dd6bbfad46db19c72271c073ead1f6f 100644 (file)
@@ -337,12 +337,13 @@ public:
         EXPECT_EQ(1, cnt) << "Command " << command << " not found";
     }
 
-    /// @brief Check if the answer for write-config command is correct
+    /// @brief Check if the answer for write-config command is correct.
     ///
-    /// @param response_txt response in text form (as read from the control socket)
+    /// @param response_txt response in text form (as read from
+    /// the control socket)
     /// @param exp_status expected status (0 success, 1 failure)
     /// @param exp_txt for success cases this defines the expected filename,
-    ///                for failure cases this defines the expected error message
+    /// for failure cases this defines the expected error message.
     void checkConfigWrite(const std::string& response_txt, int exp_status,
                           const std::string& exp_txt = "") {
 
@@ -724,9 +725,10 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configSet) {
     // Verify the control channel socket no longer exists.
     EXPECT_FALSE(fileExists(socket_path_));
 
-    // Verify the configuration was successful. 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:
+    // With no command channel, should still receive the response.
+    // The config contains random socket name 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
     // - verify the "text": "Configuration successful." is there
     EXPECT_NE(response.find("\"result\": 0"), std::string::npos);
index 25628f2d38d8450f574e233905e01820201b77ea..7cb3806769246c35c4166ff05d39a4caf99aa064 100644 (file)
@@ -325,8 +325,8 @@ public:
         ASSERT_TRUE(client);
 
         // Send the command. This will trigger server's handler which receives
-        // data over the HTTP domain 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());
@@ -431,12 +431,13 @@ public:
         EXPECT_EQ(1, cnt) << "Command " << command << " not found";
     }
 
-    /// @brief Check if the answer for write-config command is correct.
+    /// @brief Check if the answer for config-write command is correct.
     ///
-    /// @param response_txt response in text form (as read from the control socket)
+    /// @param response_txt response in text form (as read from
+    /// the control socket)
     /// @param exp_status expected status (0 success, 1 failure)
     /// @param exp_txt for success cases this defines the expected filename,
-    ///                for failure cases this defines the expected error message
+    /// for failure cases this defines the expected error message.
     void checkConfigWrite(const std::string& response_txt, int exp_status,
                           const std::string& exp_txt = "") {
 
index b1eef16083c3f326d517068d2fd5c384182fe59a..ed7d393bb0aa7c3e5fce82411312e3c4a7df8a17 100644 (file)
@@ -67,7 +67,7 @@ public:
         socket_port_ = socket_port;
     }
 
-    /// @nrief Returns HTTP authentication configuration.
+    /// @brief Returns HTTP authentication configuration.
     ///
     /// @note Only the basic HTTP authentication is supported.
     ///