Versions in this module Expand all Collapse all v0 v0.1.1 Nov 10, 2026 v0.1.0 Nov 10, 2026 Changes in this version + func Run(t *testing.T, h Harness) + type BatchMatcher struct + func BatchHasJob(wf string, m ...JobMatcher) BatchMatcher + func BatchSize(n int) BatchMatcher + func BatchWhere(desc string, fn func(FakeBatch) bool) BatchMatcher + func (m BatchMatcher) String() string + type Fake struct + func NewFake(opts ...FakeOption) *Fake + func (f *Fake) AssertBatchCount(t testing.TB, n int) + func (f *Fake) AssertBatched(t testing.TB, m ...BatchMatcher) + func (f *Fake) AssertCancelled(t testing.TB, ref workflow.RunRef) + func (f *Fake) AssertChained(t testing.TB, wf string, steps ...string) + func (f *Fake) AssertClosureEnqueued(t testing.TB, name string) + func (f *Fake) AssertDeleted(t testing.TB, ref workflow.RunRef) + func (f *Fake) AssertEnqueued(t testing.TB, wf string, m ...JobMatcher) + func (f *Fake) AssertEnqueuedOn(t testing.TB, queue, wf string, m ...JobMatcher) + func (f *Fake) AssertEnqueuedTimes(t testing.TB, wf string, n int, m ...JobMatcher) + func (f *Fake) AssertForced(t testing.TB, ref workflow.RunRef, complete bool) + func (f *Fake) AssertNotEnqueued(t testing.TB, wf string, m ...JobMatcher) + func (f *Fake) AssertNotPaused(t testing.TB, target workflow.PauseTarget) + func (f *Fake) AssertNothingBatched(t testing.TB) + func (f *Fake) AssertNothingEnqueued(t testing.TB) + func (f *Fake) AssertPaused(t testing.TB, target workflow.PauseTarget) + func (f *Fake) AssertRetried(t testing.TB, ref workflow.RunRef) + func (f *Fake) AssertScheduled(t testing.TB, wf string) + func (f *Fake) AssertSignalled(t testing.TB, name, key string) + func (f *Fake) AssertTriggered(t testing.TB, id workflow.ScheduleID) + func (f *Fake) Batches() []FakeBatch + func (f *Fake) Cancel(ctx context.Context, ref workflow.RunRef) error + func (f *Fake) Cancels() []workflow.RunRef + func (f *Fake) Capabilities() workflow.Caps + func (f *Fake) Closures(names ...string) []workflow.ClosureJob + func (f *Fake) Delete(ctx context.Context, ref workflow.RunRef) error + func (f *Fake) Deletes() []workflow.RunRef + func (f *Fake) Enqueue(ctx context.Context, job workflow.Job) (workflow.RunRef, error) + func (f *Fake) EnqueueClosure(ctx context.Context, c workflow.ClosureJob) (workflow.RunRef, error) + func (f *Fake) Enqueued(wf string, m ...JobMatcher) []workflow.Job + func (f *Fake) Finish(ref workflow.RunRef, st workflow.Status) error + func (f *Fake) ForceComplete(ctx context.Context, ref workflow.RunRef) error + func (f *Fake) ForceFail(ctx context.Context, ref workflow.RunRef, reason string) error + func (f *Fake) Forced() []FakeForce + func (f *Fake) Jobs() []workflow.Job + func (f *Fake) Pause(ctx context.Context, t workflow.PauseTarget) error + func (f *Fake) Paused(ctx context.Context) ([]workflow.PauseTarget, error) + func (f *Fake) Register(wf workflow.Workflow) error + func (f *Fake) Resume(ctx context.Context, t workflow.PauseTarget) error + func (f *Fake) Retries() []workflow.RunRef + func (f *Fake) Retry(ctx context.Context, ref workflow.RunRef) (workflow.RunRef, error) + func (f *Fake) RunClosures(ctx context.Context) error + func (f *Fake) Schedule(ctx context.Context, s workflow.Schedule) (workflow.ScheduleID, error) + func (f *Fake) Schedules() []FakeSchedule + func (f *Fake) Signal(ctx context.Context, ev workflow.Event) error + func (f *Fake) Signals() []workflow.Event + func (f *Fake) Start(ctx context.Context) error + func (f *Fake) Status(ctx context.Context, ref workflow.RunRef) (workflow.Status, error) + func (f *Fake) TriggerSchedule(ctx context.Context, id workflow.ScheduleID) (workflow.RunRef, error) + func (f *Fake) Triggers() []workflow.ScheduleID + func (f *Fake) Unschedule(ctx context.Context, id workflow.ScheduleID) error + func (f *Fake) Workflow(name string) (workflow.Workflow, bool) + type FakeBatch struct + ID batch.ID + Jobs []workflow.Job + type FakeForce struct + Complete bool + Reason string + Ref workflow.RunRef + type FakeOption func(*Fake) + func FakeCaps(c workflow.Caps) FakeOption + func FakeCronParser(p cron.Parser) FakeOption + func FakeExcept(inner workflow.Client, workflows ...string) FakeOption + func FakeKeyExpr() FakeOption + func FakeLike(c workflow.Client) FakeOption + func FakeOnly(inner workflow.Client, workflows ...string) FakeOption + type FakeSchedule struct + ID workflow.ScheduleID + LastRun workflow.RunRef + Schedule workflow.Schedule + Unscheduled bool + type Harness struct + KeyFromLabel func(label string) workflow.ConcurrencyKey + New func(t *testing.T) Instance + NewWithQueues func(t *testing.T, qs []workflow.QueueConfig) Instance + Poll time.Duration + Prefix string + Quiet time.Duration + RateLimitPer time.Duration + RealCron bool + Unit time.Duration + Wait time.Duration + WaitKeyFromLabel func(label string) workflow.ConcurrencyKey + type Instance struct + Client workflow.Client + Clock *clock.Fake + Crash func(t *testing.T) workflow.Client + EnqueueOnly func(t *testing.T) workflow.Client + Peer func(t *testing.T) workflow.Client + Restart func(t *testing.T) workflow.Client + type JobMatcher struct + func HasChain(workflows ...string) JobMatcher + func HasKey(key string) JobMatcher + func HasLabel(k, v string) JobMatcher + func HasPayload(p []byte) JobMatcher + func HasPayloadJSON(v any) JobMatcher + func HasPriority(p int) JobMatcher + func HasQueue(q string) JobMatcher + func HasRetry(p workflow.RetryPolicy) JobMatcher + func HasRunAt(t time.Time) JobMatcher + func Where(desc string, fn func(workflow.Job) bool) JobMatcher + func (m JobMatcher) String() string + type Recorder struct + func NewRecorder(inner workflow.Client) *Recorder + func (r *Recorder) AssertBatchCount(t testing.TB, n int) + func (r *Recorder) AssertBatched(t testing.TB, m ...BatchMatcher) + func (r *Recorder) AssertChained(t testing.TB, wf string, steps ...string) + func (r *Recorder) AssertDeleted(t testing.TB, ref workflow.RunRef) + func (r *Recorder) AssertEnqueued(t testing.TB, wf string, n int) + func (r *Recorder) AssertEnqueuedOn(t testing.TB, queue, wf string, m ...JobMatcher) + func (r *Recorder) AssertEnqueuedWith(t testing.TB, wf string, match func(workflow.Job) bool) + func (r *Recorder) AssertNotEnqueued(t testing.TB, wf string) + func (r *Recorder) AssertNotPaused(t testing.TB, target workflow.PauseTarget) + func (r *Recorder) AssertNothingBatched(t testing.TB) + func (r *Recorder) AssertNothingEnqueued(t testing.TB) + func (r *Recorder) AssertPaused(t testing.TB, target workflow.PauseTarget) + func (r *Recorder) AssertRetried(t testing.TB, ref workflow.RunRef) + func (r *Recorder) Batches() []FakeBatch + func (r *Recorder) Cancel(ctx context.Context, ref workflow.RunRef) error + func (r *Recorder) Capabilities() workflow.Caps + func (r *Recorder) Delete(ctx context.Context, ref workflow.RunRef) error + func (r *Recorder) Deletes() []workflow.RunRef + func (r *Recorder) Enqueue(ctx context.Context, job workflow.Job) (workflow.RunRef, error) + func (r *Recorder) Jobs() []workflow.Job + func (r *Recorder) OnRunFinished(fn workflow.RunFinishedFunc) error + func (r *Recorder) Register(wf workflow.Workflow) error + func (r *Recorder) Retries() []workflow.RunRef + func (r *Recorder) Retry(ctx context.Context, ref workflow.RunRef) (workflow.RunRef, error) + func (r *Recorder) Schedule(ctx context.Context, s workflow.Schedule) (workflow.ScheduleID, error) + func (r *Recorder) Signal(ctx context.Context, ev workflow.Event) error + func (r *Recorder) Start(ctx context.Context) error + func (r *Recorder) Status(ctx context.Context, ref workflow.RunRef) (workflow.Status, error) + func (r *Recorder) Unschedule(ctx context.Context, id workflow.ScheduleID) error + func (r *Recorder) Workflow(name string) (workflow.Workflow, bool) + type StepOption func(*stepRun) + func StepCaps(c workflow.Caps) StepOption + func StepChain(jobs ...workflow.Job) StepOption + func StepContext(ctx context.Context) StepOption + func StepInfoOf(info workflow.StepInfo) StepOption + func StepMiddleware(mw ...workflow.Middleware) StepOption + type StepOutcome struct + Chain []workflow.Job + Err error + Output []byte + func RunStep(h workflow.Handler, in []byte, opts ...StepOption) StepOutcome + func (o StepOutcome) AssertDiscarded(t testing.TB) + func (o StepOutcome) AssertFailed(t testing.TB) + func (o StepOutcome) AssertPermanent(t testing.TB) + func (o StepOutcome) AssertReleased(t testing.TB, d time.Duration) + func (o StepOutcome) AssertSucceeded(t testing.TB) + func (o StepOutcome) ChainNames() []string + func (o StepOutcome) Discarded() bool + func (o StepOutcome) Failed() bool + func (o StepOutcome) Permanent() bool + func (o StepOutcome) Released() (time.Duration, bool) + func (o StepOutcome) Succeeded() bool