feat(02-02): record manifest route cases and report coverage
Drive ordered route cases through RecordFlow, resume in batches of 15, and print recorded/passing/failing/unrecorded coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -31,6 +31,10 @@ func ReplayFlow(ctx context.Context, flow Flow, cfg ReplayConfig) (Result, error
|
||||
continue
|
||||
}
|
||||
sr := StepResult{ID: step.ID, OK: true}
|
||||
want := step
|
||||
if err := materializeSidecar(cfg.BaseDir, &want.Response); err != nil {
|
||||
return result, fmt.Errorf("tide: replay step %s: %w", step.ID, err)
|
||||
}
|
||||
req, err := expandRequest(step.Request, store)
|
||||
if err != nil {
|
||||
sr.OK = false
|
||||
@@ -56,7 +60,7 @@ func ReplayFlow(ctx context.Context, flow Flow, cfg ReplayConfig) (Result, error
|
||||
continue
|
||||
}
|
||||
_ = ScrubStep(store, &live)
|
||||
sr.Diffs = append(sr.Diffs, compareStep(step, live.Response)...)
|
||||
sr.Diffs = append(sr.Diffs, compareStep(want, live.Response)...)
|
||||
if len(sr.Diffs) > 0 {
|
||||
sr.OK = false
|
||||
result.OK = false
|
||||
|
||||
Reference in New Issue
Block a user