Internal function used by the tests so that the exported version can take `testing.TB` instead of `testing.T`. Also takes a schema for testing purposes, which I haven't quite figured out how to get into the public API yet.
(ctx context.Context, t testingT, tx TTx, expectedJobs []ExpectedJob)
| 392 | // Also takes a schema for testing purposes, which I haven't quite figured out |
| 393 | // how to get into the public API yet. |
| 394 | func requireManyInsertedTx[TDriver riverdriver.Driver[TTx], TTx any](ctx context.Context, t testingT, tx TTx, expectedJobs []ExpectedJob) []*rivertype.JobRow { |
| 395 | t.Helper() |
| 396 | var driver TDriver |
| 397 | actualArgs, err := requireManyInsertedErr[TDriver](ctx, t, driver.UnwrapExecutor(tx), expectedJobs) |
| 398 | if err != nil { |
| 399 | failuref(t, "Internal failure: %s", err) |
| 400 | } |
| 401 | return actualArgs |
| 402 | } |
| 403 | |
| 404 | func requireManyInsertedErr[TDriver riverdriver.Driver[TTx], TTx any](ctx context.Context, t testingT, exec riverdriver.Executor, expectedJobs []ExpectedJob) ([]*rivertype.JobRow, error) { |
| 405 | t.Helper() |
searching dependent graphs…