@@ -141,9 +141,9 @@ shutdown_redis_server() {
141141 local service_port=" $1 "
142142 unset_xtrace_when_ut_mode_false
143143 if ! is_empty " $REDIS_DEFAULT_PASSWORD " ; then
144- redis-cli -h 127.0.0.1 -p " $service_port " -a " $REDIS_DEFAULT_PASSWORD " $REDIS_CLI_TLS_CMD shutdown
144+ redis-cli $REDIS_CLI_TLS_CMD -h 127.0.0.1 -p " $service_port " -a " $REDIS_DEFAULT_PASSWORD " shutdown
145145 else
146- redis-cli -h 127.0.0.1 -p " $service_port " $REDIS_CLI_TLS_CMD shutdown
146+ redis-cli $REDIS_CLI_TLS_CMD -h 127.0.0.1 -p " $service_port " shutdown
147147 fi
148148 set_xtrace_when_ut_mode_false
149149 echo " shutdown redis server succeeded!"
@@ -155,9 +155,9 @@ check_redis_server_ready() {
155155 local port=" $2 "
156156 local max_retry=10
157157 local retry_interval=5
158- check_ready_cmd=" redis-cli -h $host -p $port $REDIS_CLI_TLS_CMD ping"
158+ check_ready_cmd=" redis-cli $REDIS_CLI_TLS_CMD -h $host -p $port ping"
159159 if ! is_empty " $REDIS_DEFAULT_PASSWORD " ; then
160- check_ready_cmd=" redis-cli -h $host -p $port -a $REDIS_DEFAULT_PASSWORD $REDIS_CLI_TLS_CMD ping"
160+ check_ready_cmd=" redis-cli $REDIS_CLI_TLS_CMD -h $host -p $port -a $REDIS_DEFAULT_PASSWORD ping"
161161 fi
162162 output=$( $check_ready_cmd )
163163 set_xtrace_when_ut_mode_false
@@ -227,10 +227,10 @@ send_cluster_meet() {
227227
228228 unset_xtrace_when_ut_mode_false
229229 if is_empty " $REDIS_DEFAULT_PASSWORD " ; then
230- meet_command=" redis-cli -h $primary_endpoint -p $primary_port $REDIS_CLI_TLS_CMD cluster meet $announce_ip $announce_port $announce_bus_port "
230+ meet_command=" redis-cli $REDIS_CLI_TLS_CMD -h $primary_endpoint -p $primary_port cluster meet $announce_ip $announce_port $announce_bus_port "
231231 logging_mask_meet_command=" $meet_command "
232232 else
233- meet_command=" redis-cli -h $primary_endpoint -p $primary_port -a $REDIS_DEFAULT_PASSWORD $REDIS_CLI_TLS_CMD cluster meet $announce_ip $announce_port $announce_bus_port "
233+ meet_command=" redis-cli $REDIS_CLI_TLS_CMD -h $primary_endpoint -p $primary_port -a $REDIS_DEFAULT_PASSWORD cluster meet $announce_ip $announce_port $announce_bus_port "
234234 logging_mask_meet_command=" ${meet_command/ $REDIS_DEFAULT_PASSWORD /******** } "
235235 fi
236236 echo " check and correct other primary nodes meet command: $logging_mask_meet_command "
@@ -249,9 +249,9 @@ get_cluster_info() {
249249 local cluster_node=" $1 "
250250 local cluster_node_port=" $2 "
251251 unset_xtrace_when_ut_mode_false
252- local command=" redis-cli -h $cluster_node -p $cluster_node_port $REDIS_CLI_TLS_CMD cluster info"
252+ local command=" redis-cli $REDIS_CLI_TLS_CMD -h $cluster_node -p $cluster_node_port cluster info"
253253 if ! is_empty " $REDIS_DEFAULT_PASSWORD " ; then
254- command=" redis-cli -h $cluster_node -p $cluster_node_port -a $REDIS_DEFAULT_PASSWORD $REDIS_CLI_TLS_CMD cluster info"
254+ command=" redis-cli $REDIS_CLI_TLS_CMD -h $cluster_node -p $cluster_node_port -a $REDIS_DEFAULT_PASSWORD cluster info"
255255 fi
256256 cluster_info=$( $command )
257257 set_xtrace_when_ut_mode_false
@@ -268,9 +268,9 @@ get_cluster_nodes_info() {
268268 local cluster_node=" $1 "
269269 local cluster_node_port=" $2 "
270270 unset_xtrace_when_ut_mode_false
271- local command=" redis-cli -h $cluster_node -p $cluster_node_port $REDIS_CLI_TLS_CMD cluster nodes"
271+ local command=" redis-cli $REDIS_CLI_TLS_CMD -h $cluster_node -p $cluster_node_port cluster nodes"
272272 if ! is_empty " $REDIS_DEFAULT_PASSWORD " ; then
273- command=" redis-cli -h $cluster_node -p $cluster_node_port -a $REDIS_DEFAULT_PASSWORD $REDIS_CLI_TLS_CMD cluster nodes"
273+ command=" redis-cli $REDIS_CLI_TLS_CMD -h $cluster_node -p $cluster_node_port -a $REDIS_DEFAULT_PASSWORD cluster nodes"
274274 fi
275275 cluster_nodes_info=$( $command )
276276 set_xtrace_when_ut_mode_false
@@ -491,10 +491,10 @@ build_redis_cluster_create_command() {
491491 local primary_nodes=" $1 "
492492 unset_xtrace_when_ut_mode_false
493493 if is_empty " $REDIS_DEFAULT_PASSWORD " ; then
494- initialize_command=" redis-cli --cluster create $primary_nodes --cluster-yes $REDIS_CLI_TLS_CMD "
494+ initialize_command=" redis-cli $REDIS_CLI_TLS_CMD --cluster create $primary_nodes --cluster-yes"
495495 logging_mask_initialize_command=" $initialize_command "
496496 else
497- initialize_command=" redis-cli --cluster create $primary_nodes -a $REDIS_DEFAULT_PASSWORD $REDIS_CLI_TLS_CMD --cluster-yes"
497+ initialize_command=" redis-cli $REDIS_CLI_TLS_CMD --cluster create $primary_nodes -a $REDIS_DEFAULT_PASSWORD --cluster-yes"
498498 logging_mask_initialize_command=" ${initialize_command/ $REDIS_DEFAULT_PASSWORD /******** } "
499499 fi
500500 echo " initialize cluster command: $logging_mask_initialize_command " >&2
0 commit comments