]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3477] Small fixes proposed by Razvan
authorFrancis Dupont <fdupont@isc.org>
Tue, 6 Aug 2024 10:46:06 +0000 (12:46 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 20 Sep 2024 11:46:27 +0000 (13:46 +0200)
12 files changed:
src/bin/d2/tests/d2_command_unittest.cc
src/bin/d2/tests/parser_unittest.cc
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/parser_unittest.cc
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
src/bin/dhcp6/tests/parser_unittest.cc
src/lib/config/config_messages.mes
src/lib/config/http_command_config.cc
src/lib/config/http_command_config.h
src/lib/config/http_command_mgr.cc
src/lib/config/tests/http_command_config_unittests.cc
src/lib/config/tests/http_command_mgr_unittests.cc

index e5bcc3a95c535c8c30643786d2fdb2b40febc24f..f9f76049270b113228d878d4ed3b96ff2406df61 100644 (file)
@@ -370,7 +370,7 @@ public:
         // let's parse expected_command back to JSON to guarantee that
         // both structures are built using the same order.
         EXPECT_EQ(Element::fromJSON(expected_command)->str(),
-                 entire_command->str());
+                  entire_command->str());
         return (createAnswer(CONTROL_RESULT_SUCCESS, "long command received ok"));
     }
 
index f1ee4a172a30738aa10e7ecda391da188d92e3cf..7faefbe0dfe40605335cad02c1b81ee6af8006b4 100644 (file)
@@ -939,7 +939,7 @@ TEST(ParserTest, duplicateControlSocket) {
      }
 })");
 
-    ASSERT_NO_THROW(Element::fromJSON(bad1, true));
+    ASSERT_NO_THROW(Element::fromJSON(bad2, true));
     D2ParserContext ctx2;
     EXPECT_THROW(ctx2.parseString(bad2, D2ParserContext::PARSER_DHCPDDNS),
                  D2ParseError);
index 06dfeffe829b7bdce4529e3fcd6930db4a99dd1d..0b50668dd42f661da9cff55379cb596c06220e54 100644 (file)
@@ -2873,7 +2873,7 @@ void removeTlsParameters(ConstElementPtr elem) {
     }
 }
 
-/// @brief Remove authentication filess
+/// @brief Remove authentication files.
 void removeAuthFiles(ConstElementPtr elem) {
     if (!elem) {
         return;
index 266ee8a6b5f7e6db060513734f685570997dd1c4..5a5d9e29c5cfa994fe239805fad4acc5aa974f7a 100644 (file)
@@ -1047,7 +1047,7 @@ TEST(ParserTest, duplicateControlSocket) {
      }
 })");
 
-    ASSERT_NO_THROW(Element::fromJSON(bad1, true));
+    ASSERT_NO_THROW(Element::fromJSON(bad2, true));
     Parser4Context ctx2;
     EXPECT_THROW(ctx2.parseString(bad2, Parser4Context::PARSER_DHCP4),
                  Dhcp4ParseError);
index 9904810fc535b1ed60ecf78ffe74760443e771c0..0a3d1feefc5e9489427b5679141c2b7cd42b5bd0 100644 (file)
@@ -237,7 +237,7 @@ void removeTlsParameters(ConstElementPtr elem) {
     }
 }
 
-/// @brief Remove authentication filess
+/// @brief Remove authentication files.
 void removeAuthFiles(ConstElementPtr elem) {
     if (!elem) {
         return;
index f84f65cdcbf72ea9da81af2a3babe636672a5e5e..ced605b6fde4b6dbedcbf5875e296f286681fd45 100644 (file)
@@ -1038,7 +1038,7 @@ TEST(ParserTest, duplicateControlSocket) {
      }
 })");
 
-    ASSERT_NO_THROW(Element::fromJSON(bad1, true));
+    ASSERT_NO_THROW(Element::fromJSON(bad2, true));
     Parser6Context ctx2;
     EXPECT_THROW(ctx2.parseString(bad2, Parser6Context::PARSER_DHCP6),
                  Dhcp6ParseError);
index 0a82b0df0d9f244aa0cc906e275680e5549bf177..0c4e7dc12ab1d6e0ec23419809fc241205f4f5e2 100644 (file)
@@ -157,7 +157,7 @@ to operate correctly.
 The warning message is issued when the HTTP/HTTPS control socket was
 reconfigured with a different TLS setup but keeping the address and port.
 These changes are ignored because they can't be applied without opening a new
-socket which will conflicts with the existing one.
+socket which will conflict with the existing one.
 
 % HTTP_COMMAND_MGR_SERVICE_STARTED started %1 service bound to address %2 port %3
 This informational message indicates that the server has started
index 684c9dedda8c6d7dc02f703230291b3036023ae9..8c2682979757553311353cdf5bcdd5a34afd8934 100644 (file)
@@ -42,7 +42,7 @@ HttpCommandConfig::HttpCommandConfig(ConstElementPtr config)
     if (socket_type) {
         if (socket_type->getType() != Element::string) {
             isc_throw(DhcpConfigError,
-                      "invalid type specified for parameter 'socket_type' ("
+                      "invalid type specified for parameter 'socket-type' ("
                       << socket_type->getPosition() << ")");
         }
         socket_type_ = socket_type->stringValue();
index ed7d393bb0aa7c3e5fce82411312e3c4a7df8a17..66739f629c380ec398277cbb359494eb4fd3820f 100644 (file)
@@ -43,7 +43,7 @@ public:
 
     /// @brief Returns socket address.
     ///
-    /// @return IP address where the server's HTTP service is available.
+    /// @return IP address where the HTTP service is available.
     isc::asiolink::IOAddress getSocketAddress() const {
         return (socket_address_);
     }
@@ -56,6 +56,8 @@ public:
     }
 
     /// @brief Returns socket port.
+    ///
+    /// @return TCP port where the HTTP service is available.
     uint16_t getSocketPort() const {
         return (socket_port_);
     }
index 65315464f46599624ce51cf7a22f5c4fba19707f..fafe50eb11356d1ce07a1343c75545fc3ad59963 100644 (file)
@@ -37,6 +37,8 @@ public:
     }
 
     /// @brief Configure control socket from configuration.
+    ///
+    /// @param config Configuration of the control socket.
     void configure(HttpCommandConfigPtr config);
 
     /// @brief Close control socket.
index dc8c09611109c91ce37c79a8c4cc0eec5dfe8c0b..80f617613e3d822d842de218deb61d7be5e410fd 100644 (file)
@@ -93,7 +93,7 @@ TEST_F(HttpCommandConfigTest, errors) {
         {
             "bad socket-type type",
             R"( { "socket-type": 1 } )",
-            "invalid type specified for parameter 'socket_type' "
+            "invalid type specified for parameter 'socket-type' "
             "(<string>:1:19)"
         },
         {
index 7177b8259ca0b126614e257f00ef5904784f82cb..c193bd8c828eb1ffc3c016000be5d38576dc9b99 100644 (file)
@@ -180,7 +180,7 @@ public:
     /// @brief "foo" command handler.
     ///
     /// The command needs no arguments and returns a response
-    ///  with a body containing:
+    /// with a body containing:
     ///
     /// "[ { \"arguments\": [ \"bar\" ], \"result\": 0 } ]"
     ///
@@ -191,7 +191,7 @@ public:
         return (createAnswer(CONTROL_RESULT_SUCCESS, arguments));
     }
 
-    /// @brief IO service used in drive the test and test clients.
+    /// @brief IO service used to drive the test and test clients.
     IOServicePtr io_service_;
 
     /// @brief Asynchronous timer service to detect timeouts.
@@ -206,7 +206,7 @@ public:
 
 /// Verifies the configure and close of HttpCommandMgr.
 TEST_F(HttpCommandMgrTest, basic) {
-    // Make sure we can configure one.
+    // Make sure we can create one.
     ASSERT_NO_THROW_LOG(HttpCommandMgr::instance().configure(http_config_));
     auto listener = HttpCommandMgr::instance().getHttpListener();
     ASSERT_TRUE(listener);