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

Function RequireManyInserted

rivertest/rivertest.go:344–347  ·  view source on GitHub ↗

RequireManyInserted is a test helper that verifies that jobs of the given kinds were inserted for work, failing the test if they weren't, or were inserted in the wrong order. If found, the inserted jobs are returned so that further assertions can be made against them. job := RequireManyInserted(ct

(ctx context.Context, tb testing.TB, driver TDriver, expectedJobs []ExpectedJob)

Source from the content-addressed store, hash-verified

342// the first expectation if the first's was empty is not allowed, and neither is
343// mixing and matching schemas between options.
344func RequireManyInserted[TDriver riverdriver.Driver[TTx], TTx any](ctx context.Context, tb testing.TB, driver TDriver, expectedJobs []ExpectedJob) []*rivertype.JobRow {
345 tb.Helper()
346 return requireManyInserted(ctx, tb, driver, expectedJobs)
347}
348
349func requireManyInserted[TDriver riverdriver.Driver[TTx], TTx any](ctx context.Context, t testingT, driver TDriver, expectedJobs []ExpectedJob) []*rivertype.JobRow {
350 t.Helper()

Callers 1

Calls 2

requireManyInsertedFunction · 0.85
HelperMethod · 0.65

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…