From 6e6c228eb0cc18f37ef4e6760b27bb61b7e74341 Mon Sep 17 00:00:00 2001 From: Taishi Kasuga Date: Sun, 17 Nov 2024 22:09:19 +0900 Subject: [PATCH] fix --- lib/redis_client/cluster/command.rb | 2 -- test/redis_client/cluster/test_command.rb | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/redis_client/cluster/command.rb b/lib/redis_client/cluster/command.rb index 6f68bffd..7db0a707 100644 --- a/lib/redis_client/cluster/command.rb +++ b/lib/redis_client/cluster/command.rb @@ -17,7 +17,6 @@ class Command Detail = Struct.new( 'RedisCommand', :first_key_position, - :last_key_position, :key_step, :write?, :readonly?, @@ -54,7 +53,6 @@ def parse_command_reply(rows) acc[row[0].downcase] = ::RedisClient::Cluster::Command::Detail.new( first_key_position: row[3], - last_key_position: row[4], key_step: row[5], write?: row[2].include?('write'), readonly?: row[2].include?('readonly') diff --git a/test/redis_client/cluster/test_command.rb b/test/redis_client/cluster/test_command.rb index cbca5eb6..1234fe3d 100644 --- a/test/redis_client/cluster/test_command.rb +++ b/test/redis_client/cluster/test_command.rb @@ -53,8 +53,8 @@ def test_parse_command_reply ['set', -3, Set['write', 'denyoom', 'movablekeys'], 1, -1, 2, Set['@write', '@string', '@slow'], Set[], Set[], Set[]] ], want: { - 'get' => { first_key_position: 1, last_key_position: -1, key_step: 1, write?: false, readonly?: true }, - 'set' => { first_key_position: 1, last_key_position: -1, key_step: 2, write?: true, readonly?: false } + 'get' => { first_key_position: 1, key_step: 1, write?: false, readonly?: true }, + 'set' => { first_key_position: 1, key_step: 2, write?: true, readonly?: false } } }, { @@ -62,7 +62,7 @@ def test_parse_command_reply ['GET', 2, Set['readonly', 'fast'], 1, -1, 1, Set['@read', '@string', '@fast'], Set[], Set[], Set[]] ], want: { - 'get' => { first_key_position: 1, last_key_position: -1, key_step: 1, write?: false, readonly?: true } + 'get' => { first_key_position: 1, key_step: 1, write?: false, readonly?: true } } }, { rows: [[]], want: {} },