MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / TestHashDel

Function TestHashDel

IceFireDB-PubSub/test/cmd_hash_test.go:177–197  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

175}
176
177func TestHashDel(t *testing.T) {
178 server.Clear()
179
180 c, err := proto.Dial(server.Addr())
181 ok(t, err)
182 defer c.Close()
183
184 assert(t, !directDoBool(t, c, "EXISTS", "wim"), "no more wim key")
185
186 // Key doesn't exists.
187 must0(t, c, "HDEL", "nosuch", "nosuch")
188
189 // Wrong key type
190 directDoString(t, c, "SET", "foo", "bar")
191 mustDo(t, c, "HDEL", "foo", "nosuch", proto.Error(msgWrongType))
192
193 // Direct HDel()
194 directDo(t, c, "HSET", "aap", "noot", "mies")
195 directDo(t, c, "HDEL", "aap", "noot")
196 equals(t, "", directDoString(t, c, "HGET", "aap", "noot"))
197}
198
199func TestHashExists(t *testing.T) {
200 server.Clear()

Callers

nothing calls this directly

Calls 13

ClearFunction · 0.92
DialFunction · 0.92
AddrFunction · 0.92
ErrorFunction · 0.92
okFunction · 0.70
assertFunction · 0.70
directDoBoolFunction · 0.70
must0Function · 0.70
directDoStringFunction · 0.70
mustDoFunction · 0.70
directDoFunction · 0.70
equalsFunction · 0.70

Tested by

no test coverage detected