Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several test cases for the cluster client #1278

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading