test(progress): a keyed failure logs its kind, not the error's text (red; review F3)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -197,7 +197,7 @@ func TestTracker_FailRunningMarksTheRunningStepFailedAndLeavesTheRestPending(t *
|
||||
require.Equal(t, domain.StepPending, stateOf(steps, "save"), "what never started stays pending: it shows where the job stopped")
|
||||
}
|
||||
|
||||
func TestTracker_AKeyedFailMarksOneStepFailedLogsWhyAndTheJobGoesOn(t *testing.T) {
|
||||
func TestTracker_AKeyedFailMarksOneStepFailedLogsItsKindAndTheJobGoesOn(t *testing.T) {
|
||||
tr, sink, _, buf := newTracker(t)
|
||||
tr.Start()
|
||||
tr.Begin("audio", 0)
|
||||
@@ -209,7 +209,8 @@ func TestTracker_AKeyedFailMarksOneStepFailedLogsWhyAndTheJobGoesOn(t *testing.T
|
||||
require.Equal(t, domain.StepFailed, stateOf(steps, "audio"))
|
||||
require.Equal(t, domain.StepRunning, stateOf(steps, "decide"), "a soft failure must not stop the next step from running")
|
||||
require.Contains(t, buf.String(), "level=WARN")
|
||||
require.Contains(t, buf.String(), "gateway said no")
|
||||
require.NotContains(t, buf.String(), "gateway said no", "an error's text can carry provider output or a path: the log gets its kind")
|
||||
require.Contains(t, buf.String(), "kind=error")
|
||||
require.Contains(t, buf.String(), "step=audio")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user