Skip to content

Commit 4e2fa11

Browse files
madolsonSoftlyRaining
authored andcommitted
Use the correct port for migration test (valkey-io#2050)
One of the new tests that was added uses `CONFIG GET PORT`, which isn't right one for TLS. Also removed some other use of the helper which aren't actually used. Introduced as part of valkey-io#1671. --------- Signed-off-by: Madelyn Olson <[email protected]>
1 parent c85b407 commit 4e2fa11

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/unit/cluster/slot-migration.tcl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ proc get_myself_primary_linkstate {srv_idx} {
2525
}
2626

2727
proc get_port {instance_id} {
28-
return [lindex [R $instance_id CONFIG GET port] 1]
28+
if {$::tls} {
29+
set port [lindex [R $instance_id CONFIG GET tls-port] 1]
30+
} else {
31+
set port [lindex [R $instance_id CONFIG GET port] 1]
32+
}
2933
}
3034

3135
proc wait_for_role {srv_idx role} {
@@ -570,7 +574,6 @@ start_cluster 3 3 {tags {external:skip cluster} } {
570574
set primary_id_src 0
571575
set primary_id_src_nodeid [R $primary_id_src CLUSTER MYID]
572576
set primary_id_target 1
573-
set primary_id_target_port [get_port $primary_id_target]
574577
set primary_id_target_nodeid [R $primary_id_target CLUSTER MYID]
575578

576579
R $primary_id_src select 0
@@ -598,7 +601,6 @@ start_cluster 3 3 {tags {external:skip cluster} } {
598601
set primary_id_src 0
599602
set primary_id_src_nodeid [R $primary_id_src CLUSTER MYID]
600603
set primary_id_target 1
601-
set primary_id_target_port [get_port $primary_id_target]
602604
set primary_id_target_nodeid [R $primary_id_target CLUSTER MYID]
603605

604606
R $primary_id_src select 0

0 commit comments

Comments
 (0)