From 370ab4c4db9f5ec83d9ceb3edf9518ad322f31f3 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Thu, 1 Apr 2021 09:44:44 +0300 Subject: Solve sentinel test issue in TLS due to recent tests change. (#8728) 5629dbe71 added a change that configures the tcp (plaintext) port alongside the tls port, this causes the INFO command for tcp_port to return that instead of the tls port when running in tls, and that broke the sentinel tests that query it. the fix is to add a method that gets the right port from CONFIG instead of relying on the tcp_port info field. --- tests/instances.tcl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/instances.tcl') 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 -- cgit v1.2.1