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

Add Redis 6.2 to the GitHub Actions test suite #979

Merged
merged 5 commits into from
Mar 20, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
redis: ["6.0"]
redis: ["6.2"]
ruby: ["3.0", "2.7", "2.6", "2.5", "2.4"]
driver: ["ruby", "hiredis", "synchrony"]
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
redis: ["5.0", "4.0", "3.2", "3.0"]
redis: ["6.0", "5.0", "4.0", "3.2", "3.0"]
ruby: ["jruby-9.2.9.0", "2.3"]
driver: ["ruby"]
runs-on: ${{ matrix.os }}
Expand Down
9 changes: 8 additions & 1 deletion test/cluster_commands_on_server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def test_client_list
actual = a_client_info.keys.sort
expected = %w[addr age cmd db events fd flags id idle multi name obl oll omem psub qbuf qbuf-free sub]
expected << 'user' << 'argv-mem' << 'tot-mem' if version >= '6'
expected << 'laddr' << 'redir' if version >= '6.2'
assert_equal expected.sort, actual.sort
end

Expand Down Expand Up @@ -79,10 +80,16 @@ def test_command_getkeys
end

def test_command_info
eval_command_flags = if version >= '6.2'
%w[noscript may_replicate movablekeys]
else
%w[noscript movablekeys]
end

expected = [
['get', 2, %w[readonly fast], 1, 1, 1],
['set', -3, %w[write denyoom], 1, 1, 1],
['eval', -3, %w[noscript movablekeys], 0, 0, 0]
['eval', -3, eval_command_flags, 0, 0, 0]
]
if version >= '6'
expected[0] << ["@read", "@string", "@fast"]
Expand Down
15 changes: 11 additions & 4 deletions test/lint/streams.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,17 @@ def test_xtrim_with_not_existed_stream
end

def test_xtrim_with_invalid_arguments
assert_equal 0, redis.xtrim('', '')
assert_equal 0, redis.xtrim(nil, nil)
assert_equal 0, redis.xtrim('s1', 0)
assert_equal 0, redis.xtrim('s1', -1, approximate: true)
if version >= '6.2'
assert_raises(Redis::CommandError) { redis.xtrim('', '') }
assert_raises(Redis::CommandError) { redis.xtrim(nil, nil) }
assert_equal 0, redis.xtrim('s1', 0)
assert_raises(Redis::CommandError) { redis.xtrim('s1', -1, approximate: true) }
else
assert_equal 0, redis.xtrim('', '')
assert_equal 0, redis.xtrim(nil, nil)
assert_equal 0, redis.xtrim('s1', 0)
assert_equal 0, redis.xtrim('s1', -1, approximate: true)
end
end

def test_xdel_with_splatted_entry_ids
Expand Down