MCPcopy Index your code
hub / github.com/riverqueue/river / RequireNotInserted

Function RequireNotInserted

rivertest/rivertest.go:214–217  ·  view source on GitHub ↗

RequireNotInserted is a test helper that verifies that a job of the given kind was not inserted for work, failing the test if one was. job := RequireNotInserted(ctx, t, riverpgxv5.New(dbPool), &Job1Args{}, nil) This variant takes a driver that wraps a database pool. See also RequireNotInsertedTx

(ctx context.Context, tb testing.TB, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts)

Source from the content-addressed store, hash-verified

212// If more rows than one were found, the assertion fails if any of them match
213// the given opts.
214func RequireNotInserted[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, tb testing.TB, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts) {
215 tb.Helper()
216 requireNotInserted(ctx, tb, driver, expectedJob, opts)
217}
218
219func requireNotInserted[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, t testingT, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts) {
220 t.Helper()

Callers

nothing calls this directly

Calls 2

requireNotInsertedFunction · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…