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, expectedJob TArgs, opts *RequireInsertedOpts)
| 143 | // Also takes a schema for testing purposes, which I haven't quite figured out |
| 144 | // how to get into the public API yet. |
| 145 | func requireInsertedTx[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, t testingT, tx TTx, expectedJob TArgs, opts *RequireInsertedOpts) *river.Job[TArgs] { |
| 146 | t.Helper() |
| 147 | var driver TDriver |
| 148 | actualArgs, err := requireInsertedErr[TDriver](ctx, t, driver.UnwrapExecutor(tx), expectedJob, opts) |
| 149 | if err != nil { |
| 150 | failuref(t, "Internal failure: %s", err) |
| 151 | } |
| 152 | return actualArgs |
| 153 | } |
| 154 | |
| 155 | func requireInsertedErr[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, t testingT, exec riverdriver.Executor, expectedJob TArgs, opts *RequireInsertedOpts) (*river.Job[TArgs], error) { |
| 156 | t.Helper() |
searching dependent graphs…