summaryrefslogtreecommitdiff
path: root/tests/instances.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/instances.tcl')
-rw-r--r--tests/instances.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/instances.tcl b/tests/instances.tcl
index ad605c316..1395efa0c 100644
--- a/tests/instances.tcl
+++ b/tests/instances.tcl
@@ -499,6 +499,14 @@ proc RI {n field} {
get_info_field [R $n info] $field
}
+proc RPort {n} {
+ if {$::tls} {
+ return [lindex [R $n config get tls-port] 1]
+ } else {
+ return [lindex [R $n config get port] 1]
+ }
+}
+
# Iterate over IDs of sentinel or redis instances.
proc foreach_instance_id {instances idvar code} {
upvar 1 $idvar id