// 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"));
}
}
})");
- 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);
}
}
-/// @brief Remove authentication filess
+/// @brief Remove authentication files.
void removeAuthFiles(ConstElementPtr elem) {
if (!elem) {
return;
}
})");
- 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);
}
}
-/// @brief Remove authentication filess
+/// @brief Remove authentication files.
void removeAuthFiles(ConstElementPtr elem) {
if (!elem) {
return;
}
})");
- 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);
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
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();
/// @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_);
}
}
/// @brief Returns socket port.
+ ///
+ /// @return TCP port where the HTTP service is available.
uint16_t getSocketPort() const {
return (socket_port_);
}
}
/// @brief Configure control socket from configuration.
+ ///
+ /// @param config Configuration of the control socket.
void configure(HttpCommandConfigPtr config);
/// @brief Close control socket.
{
"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)"
},
{
/// @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 } ]"
///
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.
/// 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);