szaszm commented on code in PR #1457:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1457#discussion_r1061447296
##########
extensions/standard-processors/tests/unit/ListenTcpTests.cpp:
##########
@@ -134,60 +147,64 @@ TEST_CASE("Test ListenTCP with SSL connection",
"[ListenTCP][NetworkListenerProc
SECTION("Without client certificate verification") {
SECTION("Client certificate not required, Client Auth set to NONE by
default") {
+ ssl_context_service->enable();
+ port = scheduleProcessorOnRandomPort(controller, listen_tcp);
SECTION("sending through IPv4", "[IPv4]") {
- endpoint = asio::ip::tcp::endpoint(asio::ip::address_v4::loopback(),
PORT);
+ endpoint = asio::ip::tcp::endpoint(asio::ip::address_v4::loopback(),
port);
}
SECTION("sending through IPv6", "[IPv6]") {
if (utils::isIPv6Disabled())
return;
- endpoint = asio::ip::tcp::endpoint(asio::ip::address_v6::loopback(),
PORT);
+ endpoint = asio::ip::tcp::endpoint(asio::ip::address_v6::loopback(),
port);
}
}
SECTION("Client certificate not required, but validated if provided") {
REQUIRE(controller.plan->setProperty(listen_tcp,
ListenTCP::ClientAuth.getName(), "WANT"));
+ ssl_context_service->enable();
+ port = scheduleProcessorOnRandomPort(controller, listen_tcp);
SECTION("sending through IPv4", "[IPv4]") {
- endpoint = asio::ip::tcp::endpoint(asio::ip::address_v4::loopback(),
PORT);
+ endpoint = asio::ip::tcp::endpoint(asio::ip::address_v4::loopback(),
port);
}
SECTION("sending through IPv6", "[IPv6]") {
if (utils::isIPv6Disabled())
return;
- endpoint = asio::ip::tcp::endpoint(asio::ip::address_v6::loopback(),
PORT);
+ endpoint = asio::ip::tcp::endpoint(asio::ip::address_v6::loopback(),
port);
}
}
- ssl_context_service->enable();
- controller.plan->scheduleProcessor(listen_tcp);
expected_successful_messages = {"test_message_1", "another_message"};
for (const auto& message: expected_successful_messages) {
- REQUIRE(utils::sendMessagesViaSSL({message}, endpoint,
minifi::utils::file::concat_path(executable_dir, "resources/ca_A.crt")));
+ check_no_error(utils::sendMessagesViaSSL({message}, endpoint,
minifi::utils::file::concat_path(executable_dir, "resources/ca_A.crt")));
Review Comment:
I'd prefer to keep it lowercase, since it's not a macro.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]