adding missing test cases GET and GETEX (#12125)

adding test case of expired key or not exist for GET and GETEX.
for better test coverage.
This commit is contained in:
Wen Hui 2023-05-07 04:46:11 -04:00 committed by GitHub
parent ce5f4ea3a9
commit 42dd98ec19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -151,6 +151,14 @@ start_server {tags {"string"}} {
set ex
} {*syntax*}
test "GETEX and GET expired key or not exist" {
r del foo
r set foo bar px 1
after 2
assert_equal {} [r getex foo]
assert_equal {} [r get foo]
}
test "GETEX no arguments" {
set ex {}
catch {r getex} ex