summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2024-08-06 12:46:06 +0200
committerFrancis Dupont <fdupont@isc.org>2024-09-20 13:46:27 +0200
commitafb048fad096de6491ecf3e1c5a53bedb701dac4 (patch)
tree66661fda72e24b36c1047722d9c4757edf95eff5 /src
parent[#3477] Checkpoint: last changes for d2 (diff)
downloadkea-afb048fad096de6491ecf3e1c5a53bedb701dac4.tar.xz
kea-afb048fad096de6491ecf3e1c5a53bedb701dac4.zip
[#3477] Small fixes proposed by Razvan
Diffstat (limited to 'src')
-rw-r--r--src/bin/d2/tests/d2_command_unittest.cc2
-rw-r--r--src/bin/d2/tests/parser_unittest.cc2
-rw-r--r--src/bin/dhcp4/tests/dhcp4_srv_unittest.cc2
-rw-r--r--src/bin/dhcp4/tests/parser_unittest.cc2
-rw-r--r--src/bin/dhcp6/tests/dhcp6_srv_unittest.cc2
-rw-r--r--src/bin/dhcp6/tests/parser_unittest.cc2
-rw-r--r--src/lib/config/config_messages.mes2
-rw-r--r--src/lib/config/http_command_config.cc2
-rw-r--r--src/lib/config/http_command_config.h4
-rw-r--r--src/lib/config/http_command_mgr.cc2
-rw-r--r--src/lib/config/tests/http_command_config_unittests.cc2
-rw-r--r--src/lib/config/tests/http_command_mgr_unittests.cc6
12 files changed, 17 insertions, 13 deletions
diff --git a/src/bin/d2/tests/d2_command_unittest.cc b/src/bin/d2/tests/d2_command_unittest.cc
index e5bcc3a95c..f9f7604927 100644
--- a/src/bin/d2/tests/d2_command_unittest.cc
+++ b/src/bin/d2/tests/d2_command_unittest.cc
@@ -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"));
}
diff --git a/src/bin/d2/tests/parser_unittest.cc b/src/bin/d2/tests/parser_unittest.cc
index f1ee4a172a..7faefbe0df 100644
--- a/src/bin/d2/tests/parser_unittest.cc
+++ b/src/bin/d2/tests/parser_unittest.cc
@@ -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);
diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
index 06dfeffe82..0b50668dd4 100644
--- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
+++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
@@ -2873,7 +2873,7 @@ void removeTlsParameters(ConstElementPtr elem) {
}
}
-/// @brief Remove authentication filess
+/// @brief Remove authentication files.
void removeAuthFiles(ConstElementPtr elem) {
if (!elem) {
return;
diff --git a/src/bin/dhcp4/tests/parser_unittest.cc b/src/bin/dhcp4/tests/parser_unittest.cc
index 266ee8a6b5..5a5d9e29c5 100644
--- a/src/bin/dhcp4/tests/parser_unittest.cc
+++ b/src/bin/dhcp4/tests/parser_unittest.cc
@@ -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);
diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
index 9904810fc5..0a3d1feefc 100644
--- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
+++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
@@ -237,7 +237,7 @@ void removeTlsParameters(ConstElementPtr elem) {
}
}
-/// @brief Remove authentication filess
+/// @brief Remove authentication files.
void removeAuthFiles(ConstElementPtr elem) {
if (!elem) {
return;
diff --git a/src/bin/dhcp6/tests/parser_unittest.cc b/src/bin/dhcp6/tests/parser_unittest.cc
index f84f65cdcb..ced605b6fd 100644
--- a/src/bin/dhcp6/tests/parser_unittest.cc
+++ b/src/bin/dhcp6/tests/parser_unittest.cc
@@ -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);
diff --git a/src/lib/config/config_messages.mes b/src/lib/config/config_messages.mes
index 0a82b0df0d..0c4e7dc12a 100644
--- a/src/lib/config/config_messages.mes
+++ b/src/lib/config/config_messages.mes
@@ -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
diff --git a/src/lib/config/http_command_config.cc b/src/lib/config/http_command_config.cc
index 684c9dedda..8c26829797 100644
--- a/src/lib/config/http_command_config.cc
+++ b/src/lib/config/http_command_config.cc
@@ -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();
diff --git a/src/lib/config/http_command_config.h b/src/lib/config/http_command_config.h
index ed7d393bb0..66739f629c 100644
--- a/src/lib/config/http_command_config.h
+++ b/src/lib/config/http_command_config.h
@@ -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_);
}
diff --git a/src/lib/config/http_command_mgr.cc b/src/lib/config/http_command_mgr.cc
index 65315464f4..fafe50eb11 100644
--- a/src/lib/config/http_command_mgr.cc
+++ b/src/lib/config/http_command_mgr.cc
@@ -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.
diff --git a/src/lib/config/tests/http_command_config_unittests.cc b/src/lib/config/tests/http_command_config_unittests.cc
index dc8c096111..80f617613e 100644
--- a/src/lib/config/tests/http_command_config_unittests.cc
+++ b/src/lib/config/tests/http_command_config_unittests.cc
@@ -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)"
},
{
diff --git a/src/lib/config/tests/http_command_mgr_unittests.cc b/src/lib/config/tests/http_command_mgr_unittests.cc
index 7177b8259c..c193bd8c82 100644
--- a/src/lib/config/tests/http_command_mgr_unittests.cc
+++ b/src/lib/config/tests/http_command_mgr_unittests.cc
@@ -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);