From c007f55180555e9e2fa3d0bfa45806e742505f32 Mon Sep 17 00:00:00 2001 From: Kyungmin Bae Date: Mon, 27 May 2024 22:42:08 +0900 Subject: [PATCH] Add integration test for SRANDMEMBER on nonexistent key --- integration/set_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/set_test.go b/integration/set_test.go index 2e53e9f..54f9fb9 100644 --- a/integration/set_test.go +++ b/integration/set_test.go @@ -191,7 +191,8 @@ func TestSetSrandmember(t *testing.T) { c.Do("SRANDMEMBER", "s", "-5") c.Do("SRANDMEMBER", "s", "0") - c.Do("SPOP", "nosuch") + c.Do("SRANDMEMBER", "nosuch") + c.Do("SRANDMEMBER", "nosuch", "1") // failure cases c.Error("wrong number", "SRANDMEMBER")