From 52cae8a0a28d67669a5fa4ac1898384a2cc328e6 Mon Sep 17 00:00:00 2001 From: Taishi Kasuga Date: Mon, 13 May 2024 14:45:05 +0900 Subject: [PATCH] Fix several test cases for the cluster client --- cluster/test/client_internals_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cluster/test/client_internals_test.rb b/cluster/test/client_internals_test.rb index 2f5d660d5..2cedbcbbe 100644 --- a/cluster/test/client_internals_test.rb +++ b/cluster/test/client_internals_test.rb @@ -56,7 +56,8 @@ def test_inspect def test_acl_auth_success target_version "6.0.0" do with_acl do |username, password| - r = _new_client(nodes: DEFAULT_PORTS.map { |port| "redis://#{username}:#{password}@#{DEFAULT_HOST}:#{port}" }) + nodes = DEFAULT_PORTS.map { |port| "redis://#{username}:#{password}@#{DEFAULT_HOST}:#{port}" } + r = _new_client(nodes: nodes) assert_equal('PONG', r.ping) end end @@ -66,7 +67,9 @@ def test_acl_auth_failure target_version "6.0.0" do with_acl do |username, _| assert_raises(Redis::Cluster::InitialSetupError) do - _new_client(nodes: DEFAULT_PORTS.map { |port| "redis://#{username}:wrongpassword@#{DEFAULT_HOST}:#{port}" }) + nodes = DEFAULT_PORTS.map { |port| "redis://#{username}:wrongpassword@#{DEFAULT_HOST}:#{port}" } + r = _new_client(nodes: nodes) + r.ping end end end