Skip to content

Commit

Permalink
Merge pull request #1278 from supercaracal/fix-a-test-case-for-cluster
Browse files Browse the repository at this point in the history
Fix several test cases for the cluster client
  • Loading branch information
byroot authored May 13, 2024
2 parents 15c8c92 + 52cae8a commit 13f3246
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 13f3246

Please sign in to comment.