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

Function mustDo

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

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

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

Source from the content-addressed store, hash-verified

78
79// execute a Do(args[,-1]...), which needs to be the same as the last arg.
80func mustDo(tb testing.TB, c *proto.Client, args ...string) {
81 tb.Helper()
82 args, want := args[:len(args)-1], args[len(args)-1]
83 res, err := c.Do(args...)
84 if !(proto.IsError(want)) {
85 ok(tb, err)
86 }
87 equals(tb, want, res)
88}
89
90// mustOK is a mustDo() which expects an "OK" response
91func mustOK(tb testing.TB, c *proto.Client, args ...string) {

Callers 15

TestSaddFunction · 0.70
TestSismemberFunction · 0.70
TestSremFunction · 0.70
TestSpopFunction · 0.70
TestSrandmemberFunction · 0.70
TestSscanFunction · 0.70
TestSortedSetFunction · 0.70
TestSortedSetAddFunction · 0.70
TestSortedSetRangeFunction · 0.70
TestIssue10Function · 0.70
TestSortedSetRemFunction · 0.70

Calls 4

IsErrorFunction · 0.92
okFunction · 0.70
equalsFunction · 0.70
DoMethod · 0.45

Tested by

no test coverage detected