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

Function TestHashScan

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

Source from the content-addressed store, hash-verified

137}
138
139func TestHashScan(t *testing.T) {
140 c := getTestConn()
141
142 ctx := context.Background()
143 key := "scan_hash"
144 c.Do(ctx, "HMSET", key, "a", 1, "b", 2)
145
146 if ay, err := c.Do(ctx, "HSCAN", key, "0").Result(); err != nil {
147 t.Fatal(err)
148 } else if ay, ok := ay.([]interface{}); !ok || len(ay) != 2 {
149 t.Fatal(len(ay))
150 } else {
151 checkScanValues(t, ay[1], "a", "1", "b", "2")
152 }
153}
154
155func TestXSetScan(t *testing.T) {
156 c := getTestConn()

Callers

nothing calls this directly

Calls 3

getTestConnFunction · 0.85
checkScanValuesFunction · 0.85
DoMethod · 0.45

Tested by

no test coverage detected