From 755d14a10dd8460a7a6ce947cf33d83428fa797c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anarthal=20=28Rub=C3=A9n=20P=C3=A9rez=29?= <34971811+anarthal@users.noreply.github.com> Date: Sat, 29 Nov 2025 22:26:37 +0100 Subject: [PATCH] Renames test_setup_request_utils to test_compose_setup_request (#359) --- test/CMakeLists.txt | 2 +- test/Jamfile | 2 +- ...ils.cpp => test_compose_setup_request.cpp} | 46 +++++++++---------- 3 files changed, 24 insertions(+), 26 deletions(-) rename test/{test_setup_request_utils.cpp => test_compose_setup_request.cpp} (88%) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 72a28a29..a7ab3518 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -46,7 +46,7 @@ make_test(test_reader_fsm) make_test(test_connect_fsm) make_test(test_sentinel_resolve_fsm) make_test(test_run_fsm) -make_test(test_setup_request_utils) +make_test(test_compose_setup_request) make_test(test_setup_adapter) make_test(test_multiplexer) make_test(test_parse_sentinel_response) diff --git a/test/Jamfile b/test/Jamfile index 5db6c0ae..b6676bf6 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -63,7 +63,7 @@ local tests = test_sentinel_resolve_fsm test_run_fsm test_connect_fsm - test_setup_request_utils + test_compose_setup_request test_setup_adapter test_multiplexer test_parse_sentinel_response diff --git a/test/test_setup_request_utils.cpp b/test/test_compose_setup_request.cpp similarity index 88% rename from test/test_setup_request_utils.cpp rename to test/test_compose_setup_request.cpp index b2bab2ef..2f91a947 100644 --- a/test/test_setup_request_utils.cpp +++ b/test/test_compose_setup_request.cpp @@ -23,11 +23,9 @@ namespace redis = boost::redis; using redis::detail::compose_setup_request; using boost::system::error_code; -// TODO: rename the file - namespace { -void test_compose_setup() +void test_hello() { redis::config cfg; cfg.clientname = ""; @@ -41,7 +39,7 @@ void test_compose_setup() BOOST_TEST(cfg.setup.get_config().cancel_on_connection_lost); } -void test_compose_setup_select() +void test_select() { redis::config cfg; cfg.clientname = ""; @@ -58,7 +56,7 @@ void test_compose_setup_select() BOOST_TEST(cfg.setup.get_config().cancel_on_connection_lost); } -void test_compose_setup_clientname() +void test_clientname() { redis::config cfg; @@ -72,7 +70,7 @@ void test_compose_setup_clientname() BOOST_TEST(cfg.setup.get_config().cancel_on_connection_lost); } -void test_compose_setup_auth() +void test_auth() { redis::config cfg; cfg.clientname = ""; @@ -89,7 +87,7 @@ void test_compose_setup_auth() BOOST_TEST(cfg.setup.get_config().cancel_on_connection_lost); } -void test_compose_setup_auth_empty_password() +void test_auth_empty_password() { redis::config cfg; cfg.clientname = ""; @@ -105,7 +103,7 @@ void test_compose_setup_auth_empty_password() BOOST_TEST(cfg.setup.get_config().cancel_on_connection_lost); } -void test_compose_setup_auth_setname() +void test_auth_setname() { redis::config cfg; cfg.clientname = "mytest"; @@ -123,7 +121,7 @@ void test_compose_setup_auth_setname() BOOST_TEST(cfg.setup.get_config().cancel_on_connection_lost); } -void test_compose_setup_use_setup() +void test_use_setup() { redis::config cfg; cfg.clientname = "mytest"; @@ -145,7 +143,7 @@ void test_compose_setup_use_setup() } // Regression check: we set the priority flag -void test_compose_setup_use_setup_no_hello() +void test_use_setup_no_hello() { redis::config cfg; cfg.use_setup = true; @@ -162,7 +160,7 @@ void test_compose_setup_use_setup_no_hello() } // Regression check: we set the relevant cancellation flags in the request -void test_compose_setup_use_setup_flags() +void test_use_setup_flags() { redis::config cfg; cfg.use_setup = true; @@ -182,7 +180,7 @@ void test_compose_setup_use_setup_flags() // When using Sentinel, a ROLE command is added. This works // both with the old HELLO and new setup strategies. -void test_compose_setup_sentinel_auth() +void test_sentinel_auth() { redis::config cfg; cfg.sentinel.addresses = { @@ -203,7 +201,7 @@ void test_compose_setup_sentinel_auth() BOOST_TEST(cfg.setup.get_config().cancel_on_connection_lost); } -void test_compose_setup_sentinel_use_setup() +void test_sentinel_use_setup() { redis::config cfg; cfg.sentinel.addresses = { @@ -228,17 +226,17 @@ void test_compose_setup_sentinel_use_setup() int main() { - test_compose_setup(); - test_compose_setup_select(); - test_compose_setup_clientname(); - test_compose_setup_auth(); - test_compose_setup_auth_empty_password(); - test_compose_setup_auth_setname(); - test_compose_setup_use_setup(); - test_compose_setup_use_setup_no_hello(); - test_compose_setup_use_setup_flags(); - test_compose_setup_sentinel_auth(); - test_compose_setup_sentinel_use_setup(); + test_hello(); + test_select(); + test_clientname(); + test_auth(); + test_auth_empty_password(); + test_auth_setname(); + test_use_setup(); + test_use_setup_no_hello(); + test_use_setup_flags(); + test_sentinel_auth(); + test_sentinel_use_setup(); return boost::report_errors(); } \ No newline at end of file