@@ -7279,7 +7279,7 @@ var _ = Describe("Commands", func() {
72797279 })
72807280})
72817281
7282- var _ = Describe ("Get Keys from Commands " , func () {
7282+ var _ = Describe ("Keys Extraction Tests " , func () {
72837283 var client * redis.Client
72847284 var ctx = context .TODO ()
72857285
@@ -7292,12 +7292,51 @@ var _ = Describe("Get Keys from Commands", func() {
72927292 Expect (client .Close ()).NotTo (HaveOccurred ())
72937293 })
72947294
7295- It ("should test string commands" , func () {
7296- setCmd := client .Set (ctx , "key1" , "val1" , 0 )
7297- Expect (setCmd .Keys ()).To (Equal ([]string {"key1" }))
7295+ // STRING COMMANDS
72987296
7299- getCmd := client .MGet (ctx , "key1" , "key2" , "key3" )
7300- Expect (getCmd .Keys ()).To (Equal ([]string {"key1" , "key2" , "key3" }))
7297+ It ("should test Append command" , func () {
7298+ cmd := client .Append (ctx , "key1" , "value" )
7299+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" }))
7300+ })
7301+
7302+ It ("should test Decr command" , func () {
7303+ cmd := client .Decr (ctx , "key1" )
7304+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" }))
7305+ })
7306+
7307+ It ("should test Get command" , func () {
7308+ cmd := client .Get (ctx , "key1" )
7309+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" }))
7310+ })
7311+
7312+ It ("should test MGet command" , func () {
7313+ cmd := client .MGet (ctx , "key1" , "key2" , "key3" )
7314+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" , "key2" , "key3" }))
7315+ })
7316+
7317+ It ("should test Set command" , func () {
7318+ cmd := client .Set (ctx , "key1" , "value" , time .Second )
7319+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" }))
7320+ })
7321+
7322+ It ("should test MSet command" , func () {
7323+ cmd := client .MSet (ctx , "key1" , "value1" , "key2" , "value2" )
7324+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" , "key2" }))
7325+ })
7326+
7327+ It ("should test IncrBy command" , func () {
7328+ cmd := client .IncrBy (ctx , "key1" , 10 )
7329+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" }))
7330+ })
7331+
7332+ It ("should test SetNX command" , func () {
7333+ cmd := client .SetNX (ctx , "key1" , "value" , time .Second )
7334+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" }))
7335+ })
7336+
7337+ It ("should test GetDel command" , func () {
7338+ cmd := client .GetDel (ctx , "key1" )
7339+ Expect (cmd .Keys ()).To (Equal ([]string {"key1" }))
73017340 })
73027341})
73037342
0 commit comments