Files
redis-go/cluster/del_test.go
2021-09-05 18:57:02 +08:00

18 lines
450 B
Go

package cluster
import (
"github.com/hdt3213/godis/redis/connection"
"github.com/hdt3213/godis/redis/reply/asserts"
"testing"
)
func TestDel(t *testing.T) {
conn := &connection.FakeConn{}
allowFastTransaction = false
testCluster.Exec(conn, toArgs("SET", "a", "a"))
ret := Del(testCluster, conn, toArgs("DEL", "a", "b", "c"))
asserts.AssertNotError(t, ret)
ret = testCluster.Exec(conn, toArgs("GET", "a"))
asserts.AssertNullBulk(t, ret)
}