WorkContext returns a realistic context that can be used to test JobArgs.Work implementations. In particular, adds a client to the context so that river.ClientFromContext is usable in the test suite.
(ctx context.Context, client *river.Client[TTx])
| 614 | // In particular, adds a client to the context so that river.ClientFromContext is |
| 615 | // usable in the test suite. |
| 616 | func WorkContext[TTx any](ctx context.Context, client *river.Client[TTx]) context.Context { |
| 617 | return context.WithValue(ctx, rivercommon.ContextKeyClient{}, client) |
| 618 | } |
no outgoing calls
searching dependent graphs…