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)
| 251 | // Also takes a schema for testing purposes, which I haven't quite figured out |
| 252 | // how to get into the public API yet. |
| 253 | func requireNotInsertedTx[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, t testingT, tx TTx, expectedJob TArgs, opts *RequireInsertedOpts) { |
| 254 | t.Helper() |
| 255 | var driver TDriver |
| 256 | err := requireNotInsertedErr[TDriver](ctx, t, driver.UnwrapExecutor(tx), expectedJob, opts) |
| 257 | if err != nil { |
| 258 | failuref(t, "Internal failure: %s", err) |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | func requireNotInsertedErr[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, t testingT, exec riverdriver.Executor, expectedJob TArgs, opts *RequireInsertedOpts) error { |
| 263 | t.Helper() |
searching dependent graphs…