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

Function mustContain

IceFireDB-Redis-Proxy/test/test_test.go:129–138  ·  view source on GitHub ↗

execute a Do(args[,-1]...), which result needs to Contain() the same as the last arg.

(tb testing.TB, c *proto.Client, args ...string)

Source from the content-addressed store, hash-verified

127
128// execute a Do(args[,-1]...), which result needs to Contain() the same as the last arg.
129func mustContain(tb testing.TB, c *proto.Client, args ...string) {
130 tb.Helper()
131 args, want := args[:len(args)-1], args[len(args)-1]
132
133 res, err := c.Do(args...)
134 ok(tb, err)
135 if !strings.Contains(res, want) {
136 tb.Errorf("expected %q in %q", want, res)
137 }
138}
139
140/*func useRESP3(t *testing.T, c *proto.Client) {
141 mustContain(t, c, "HELLO", "3", "miniredis")

Callers

nothing calls this directly

Calls 2

okFunction · 0.70
DoMethod · 0.45

Tested by

no test coverage detected