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

Function TestHashValues

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

Source from the content-addressed store, hash-verified

292}
293
294func TestHashValues(t *testing.T) {
295 server.Clear()
296 c, err := proto.Dial(server.Addr())
297 ok(t, err)
298 defer c.Close()
299 directDo(t, c, "HSET", "wim", "zus", "jet")
300 directDo(t, c, "HSET", "wim", "teun", "vuur")
301 directDo(t, c, "HSET", "wim", "gijs", "lam")
302 directDo(t, c, "HSET", "wim", "kees", "bok")
303 mustDo(t, c, "HVALS", "wim",
304 proto.Strings(
305 "bok",
306 "jet",
307 "lam",
308 "vuur",
309 ),
310 )
311
312 mustDo(t, c, "HVALS", "nosuch", proto.Strings())
313
314 // Wrong key type
315 directDo(t, c, "SET", "foo", "bar")
316 mustDo(t, c, "HVALS", "foo", proto.Error(msgWrongType))
317}
318
319func TestHashLen(t *testing.T) {
320 server.Clear()

Callers

nothing calls this directly

Calls 9

ClearFunction · 0.92
DialFunction · 0.92
AddrFunction · 0.92
StringsFunction · 0.92
ErrorFunction · 0.92
okFunction · 0.70
directDoFunction · 0.70
mustDoFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected