diff --git a/integration_tests/commands/resp/type_test.go b/integration_tests/commands/resp/type_test.go index 482fc7b71..8d6c30994 100644 --- a/integration_tests/commands/resp/type_test.go +++ b/integration_tests/commands/resp/type_test.go @@ -72,6 +72,14 @@ func TestType(t *testing.T) { // commands: []string{"SET key1 \"foobar\"", "SET key2 \"abcdef\"", "TYPE dest"}, // expected: []interface{}{"OK", "OK", "string"}, // }, + { + name: "TYPE for key with Zset value", + commands: []string{ + "ZADD myzetset 1 'one' 2 'two'", + "TYPE myzetset", + }, + expected: []interface{}{int64(2), "zset"}, + }, } for _, tc := range testCases { diff --git a/integration_tests/commands/websocket/type_test.go b/integration_tests/commands/websocket/type_test.go index 28ab4303e..a25ca16ab 100644 --- a/integration_tests/commands/websocket/type_test.go +++ b/integration_tests/commands/websocket/type_test.go @@ -67,6 +67,14 @@ func TestType(t *testing.T) { // commands: []string{"SET key1 foobar", "SET key2 abcdef", "TYPE dest"}, // expected: []interface{}{"OK", "OK", "string"}, // }, + { + name: "TYPE for key with Zset value", + commands: []string{ + "ZADD myzetset 1 'one' 2 'two'", + "TYPE myzetset", + }, + expected: []interface{}{float64(2), "zset"}, + }, } for _, tc := range testCases {