Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand All @@ -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 = "";
Expand All @@ -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;

Expand All @@ -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 = "";
Expand All @@ -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 = "";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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();
}