Unverified Commit f32d1817 authored by Wen Hui's avatar Wen Hui Committed by GitHub
Browse files

Updating missing test cases for Hash commands (#12116)

Adding missing test case against wrong type for HRANDFIELD HGET HGETALL HDEL HINCRBY HINCRBYFLOAT HSTRLEN.
parent d659c734
......@@ -350,9 +350,16 @@ start_server {tags {"hash"}} {
set _ $rv
} {{{} {}} {{} {}} {{} {}}}
test {HMGET against wrong type} {
test {HMGET HRANDFIELD HGET HGETALL HDEL HINCRBY HINCRBYFLOAT HSTRLEN against wrong type} {
r set wrongtype somevalue
assert_error "*wrong*" {r hmget wrongtype field1 field2}
assert_error "WRONGTYPE Operation against a key*" {r hmget wrongtype field1 field2}
assert_error "WRONGTYPE Operation against a key*" {r hrandfield wrongtype}
assert_error "WRONGTYPE Operation against a key*" {r hget wrongtype field1}
assert_error "WRONGTYPE Operation against a key*" {r hgetall wrongtype}
assert_error "WRONGTYPE Operation against a key*" {r hdel wrongtype field1}
assert_error "WRONGTYPE Operation against a key*" {r hincrby wrongtype field1 2}
assert_error "WRONGTYPE Operation against a key*" {r hincrbyfloat wrongtype field1 2.5}
assert_error "WRONGTYPE Operation against a key*" {r hstrlen wrongtype field1}
}
test {HMGET - small hash} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment