MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / fakeExec

Struct fakeExec

internal/webhookpub/outbox_test.go:63–69  ·  view source on GitHub ↗

fakeExec captures Exec calls for assertion without touching a DB. `err` (if set) is returned on every call. `errOnContains` (if set) is returned only on calls whose SQL contains the substring — used to exercise selective failure modes like "pg_notify fails but the INSERT succeeds."

Source from the content-addressed store, hash-verified

61// to exercise selective failure modes like "pg_notify fails but the
62// INSERT succeeds."
63type fakeExec struct {
64 calls []string
65 args [][]any
66 err error
67 errOnContains string
68 errSelective error
69}
70
71func (f *fakeExec) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error) {
72 f.calls = append(f.calls, sql)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected