@@ -23,11 +23,9 @@ namespace redis = boost::redis;
2323using redis::detail::compose_setup_request;
2424using boost::system::error_code;
2525
26- // TODO: rename the file
27-
2826namespace {
2927
30- void test_compose_setup ()
28+ void test_hello ()
3129{
3230 redis::config cfg;
3331 cfg.clientname = " " ;
@@ -41,7 +39,7 @@ void test_compose_setup()
4139 BOOST_TEST (cfg.setup .get_config ().cancel_on_connection_lost );
4240}
4341
44- void test_compose_setup_select ()
42+ void test_select ()
4543{
4644 redis::config cfg;
4745 cfg.clientname = " " ;
@@ -58,7 +56,7 @@ void test_compose_setup_select()
5856 BOOST_TEST (cfg.setup .get_config ().cancel_on_connection_lost );
5957}
6058
61- void test_compose_setup_clientname ()
59+ void test_clientname ()
6260{
6361 redis::config cfg;
6462
@@ -72,7 +70,7 @@ void test_compose_setup_clientname()
7270 BOOST_TEST (cfg.setup .get_config ().cancel_on_connection_lost );
7371}
7472
75- void test_compose_setup_auth ()
73+ void test_auth ()
7674{
7775 redis::config cfg;
7876 cfg.clientname = " " ;
@@ -89,7 +87,7 @@ void test_compose_setup_auth()
8987 BOOST_TEST (cfg.setup .get_config ().cancel_on_connection_lost );
9088}
9189
92- void test_compose_setup_auth_empty_password ()
90+ void test_auth_empty_password ()
9391{
9492 redis::config cfg;
9593 cfg.clientname = " " ;
@@ -105,7 +103,7 @@ void test_compose_setup_auth_empty_password()
105103 BOOST_TEST (cfg.setup .get_config ().cancel_on_connection_lost );
106104}
107105
108- void test_compose_setup_auth_setname ()
106+ void test_auth_setname ()
109107{
110108 redis::config cfg;
111109 cfg.clientname = " mytest" ;
@@ -123,7 +121,7 @@ void test_compose_setup_auth_setname()
123121 BOOST_TEST (cfg.setup .get_config ().cancel_on_connection_lost );
124122}
125123
126- void test_compose_setup_use_setup ()
124+ void test_use_setup ()
127125{
128126 redis::config cfg;
129127 cfg.clientname = " mytest" ;
@@ -145,7 +143,7 @@ void test_compose_setup_use_setup()
145143}
146144
147145// Regression check: we set the priority flag
148- void test_compose_setup_use_setup_no_hello ()
146+ void test_use_setup_no_hello ()
149147{
150148 redis::config cfg;
151149 cfg.use_setup = true ;
@@ -162,7 +160,7 @@ void test_compose_setup_use_setup_no_hello()
162160}
163161
164162// Regression check: we set the relevant cancellation flags in the request
165- void test_compose_setup_use_setup_flags ()
163+ void test_use_setup_flags ()
166164{
167165 redis::config cfg;
168166 cfg.use_setup = true ;
@@ -182,7 +180,7 @@ void test_compose_setup_use_setup_flags()
182180
183181// When using Sentinel, a ROLE command is added. This works
184182// both with the old HELLO and new setup strategies.
185- void test_compose_setup_sentinel_auth ()
183+ void test_sentinel_auth ()
186184{
187185 redis::config cfg;
188186 cfg.sentinel .addresses = {
@@ -203,7 +201,7 @@ void test_compose_setup_sentinel_auth()
203201 BOOST_TEST (cfg.setup .get_config ().cancel_on_connection_lost );
204202}
205203
206- void test_compose_setup_sentinel_use_setup ()
204+ void test_sentinel_use_setup ()
207205{
208206 redis::config cfg;
209207 cfg.sentinel .addresses = {
@@ -228,17 +226,17 @@ void test_compose_setup_sentinel_use_setup()
228226
229227int main ()
230228{
231- test_compose_setup ();
232- test_compose_setup_select ();
233- test_compose_setup_clientname ();
234- test_compose_setup_auth ();
235- test_compose_setup_auth_empty_password ();
236- test_compose_setup_auth_setname ();
237- test_compose_setup_use_setup ();
238- test_compose_setup_use_setup_no_hello ();
239- test_compose_setup_use_setup_flags ();
240- test_compose_setup_sentinel_auth ();
241- test_compose_setup_sentinel_use_setup ();
229+ test_hello ();
230+ test_select ();
231+ test_clientname ();
232+ test_auth ();
233+ test_auth_empty_password ();
234+ test_auth_setname ();
235+ test_use_setup ();
236+ test_use_setup_no_hello ();
237+ test_use_setup_flags ();
238+ test_sentinel_auth ();
239+ test_sentinel_use_setup ();
242240
243241 return boost::report_errors ();
244242}
0 commit comments