fakeIdem is a programmable in-memory IdemStore for unit tests.
| 11 | |
| 12 | // fakeIdem is a programmable in-memory IdemStore for unit tests. |
| 13 | type fakeIdem struct { |
| 14 | claim idempotency.ClaimResult |
| 15 | claimErr error |
| 16 | completed *idempotency.CachedResponse |
| 17 | released bool |
| 18 | } |
| 19 | |
| 20 | func (f *fakeIdem) Claim(ctx context.Context, userID, key, path, bodyHash string) (idempotency.ClaimResult, error) { |
| 21 | return f.claim, f.claimErr |
nothing calls this directly
no outgoing calls
no test coverage detected