Skip to content

Commit

Permalink
Fix several test cases for the cluster client
Browse files Browse the repository at this point in the history
  • Loading branch information
supercaracal committed May 13, 2024
1 parent 15c8c92 commit 52cae8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cluster/test/client_internals_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 52cae8a

Please sign in to comment.