Skip to content

Commit

Permalink
Fix: Added test cases to verify the support for zset data type (#1366)
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajjs authored Dec 19, 2024
1 parent bc15fe8 commit 01a6161
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions integration_tests/commands/resp/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 8 additions & 0 deletions integration_tests/commands/websocket/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 01a6161

Please sign in to comment.