(ctx context.Context, sha1 string, keys []string, args ...interface{})
| 87 | } |
| 88 | |
| 89 | func (f *fakeScripter) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd { |
| 90 | f.mu.Lock() |
| 91 | f.evalShaROCalls++ |
| 92 | callNum := f.evalShaROCalls |
| 93 | fail := f.failFirstEvalShaROWithNoScr && callNum == 1 |
| 94 | f.mu.Unlock() |
| 95 | |
| 96 | cmd := NewCmd(ctx) |
| 97 | if fail { |
| 98 | cmd.SetErr(proto.RedisError("NOSCRIPT No matching script. Please use EVAL.")) |
| 99 | return cmd |
| 100 | } |
| 101 | cmd.SetErr(nil) |
| 102 | return cmd |
| 103 | } |
| 104 | |
| 105 | func TestNewScriptServerSHA_Run_UsesScriptLoadAndEvalSha_NoEval(t *testing.T) { |
| 106 | ctx := context.Background() |
nothing calls this directly
no test coverage detected