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

Function TestXHashScan

scan_test.go:123–137  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

121}
122
123func TestXHashScan(t *testing.T) {
124 c := getTestConn()
125
126 ctx := context.Background()
127 key := "scan_hash"
128 c.Do(ctx, "HMSET", key, "a", 1, "b", 2)
129
130 if ay, err := c.Do(ctx, "XHSCAN", key, "").Result(); err != nil {
131 t.Fatal(err)
132 } else if ay, ok := ay.([]interface{}); !ok || len(ay) != 2 {
133 t.Fatal(len(ay))
134 } else {
135 checkScanValues(t, ay[1], "a", "1", "b", "2")
136 }
137}
138
139func TestHashScan(t *testing.T) {
140 c := getTestConn()

Callers

nothing calls this directly

Calls 3

getTestConnFunction · 0.85
checkScanValuesFunction · 0.85
DoMethod · 0.45

Tested by

no test coverage detected