RequireInserted is a test helper that verifies that a job of the given kind was inserted for work, failing the test if it wasn't. If found, the inserted job is returned so that further assertions can be made against it. job := RequireInserted(ctx, t, riverpgxv5.New(dbPool), &Job1Args{}, nil) This
(ctx context.Context, tb testing.TB, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts)
| 103 | // because at that point the job to return is ambiguous. Use RequireManyInserted |
| 104 | // to cover that case instead. |
| 105 | func RequireInserted[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, tb testing.TB, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts) *river.Job[TArgs] { |
| 106 | tb.Helper() |
| 107 | return requireInserted(ctx, tb, driver, expectedJob, opts) |
| 108 | } |
| 109 | |
| 110 | func requireInserted[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, t testingT, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts) *river.Job[TArgs] { |
| 111 | t.Helper() |
searching dependent graphs…