test(unit): fix failing unit tests
This commit is contained in:
@@ -134,20 +134,20 @@ Feature: Error recovery patterns and CLI hints
|
||||
Given a plan in errored state for error recovery
|
||||
When I record an error with phase "execute" and message "Provider timed out"
|
||||
And I format the error output as "plain"
|
||||
Then the formatted output should contain "transient"
|
||||
And the formatted output should contain "Provider timed out"
|
||||
And the formatted output should contain "execute"
|
||||
Then the error recovery output should contain "transient"
|
||||
And the error recovery output should contain "Provider timed out"
|
||||
And the error recovery output should contain "execute"
|
||||
|
||||
Scenario: Format error output as JSON
|
||||
Given a plan in errored state for error recovery
|
||||
When I record an error with phase "execute" and message "Provider timed out"
|
||||
And I format the error output as "json"
|
||||
Then the formatted output should contain "transient"
|
||||
And the formatted output should contain "plan_id"
|
||||
Then the error recovery output should contain "transient"
|
||||
And the error recovery output should contain "plan_id"
|
||||
|
||||
Scenario: Format empty error history
|
||||
When I format error output as "plain" for separate plan "01EMPTYPLAN00000000001"
|
||||
Then the formatted output should contain "No errors recorded"
|
||||
Then the error recovery output should contain "No errors recorded"
|
||||
|
||||
# -- ErrorRecord model checks --------------------------------------------
|
||||
|
||||
@@ -199,22 +199,22 @@ Feature: Error recovery patterns and CLI hints
|
||||
Given a plan in errored state for error recovery
|
||||
When I record an actor-error in phase "execute" with message "Timeout" actor "test-actor" tool "test-tool"
|
||||
And I format the error output as "plain"
|
||||
Then the formatted output should contain "test-actor"
|
||||
And the formatted output should contain "test-tool"
|
||||
Then the error recovery output should contain "test-actor"
|
||||
And the error recovery output should contain "test-tool"
|
||||
|
||||
Scenario: Policy format shows automatic retry available
|
||||
Given a plan in errored state for error recovery
|
||||
And the auto retry threshold is 0.0
|
||||
When I record an error with phase "execute" and message "Connection timed out"
|
||||
And I format the error output as "plain"
|
||||
Then the formatted output should contain "Automatic retry available"
|
||||
Then the error recovery output should contain "Automatic retry available"
|
||||
|
||||
Scenario: Policy format shows human intervention required
|
||||
Given a plan in errored state for error recovery
|
||||
And the auto retry threshold is 1.0
|
||||
When I record an error with phase "execute" and message "Connection timed out"
|
||||
And I format the error output as "plain"
|
||||
Then the formatted output should contain "Human intervention required"
|
||||
Then the error recovery output should contain "Human intervention required"
|
||||
|
||||
Scenario: Policy format shows retries exhausted message
|
||||
Given a plan in errored state for error recovery
|
||||
@@ -222,7 +222,7 @@ Feature: Error recovery patterns and CLI hints
|
||||
When I record an error with phase "execute" and message "Timeout 1"
|
||||
And I record an error with phase "execute" and message "Timeout 2"
|
||||
And I format the error output as "plain"
|
||||
Then the formatted output should contain "retry attempts exhausted"
|
||||
Then the error recovery output should contain "retry attempts exhausted"
|
||||
|
||||
# -- ErrorHistory with no retriable errors --------------------------------
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ def step_then_category_breakdown(context: Context, cat: str) -> None:
|
||||
assert cat in breakdown, f"Expected category '{cat}' in breakdown, got: {breakdown}"
|
||||
|
||||
|
||||
@then('the formatted output should contain "{text}"')
|
||||
@then('the error recovery output should contain "{text}"')
|
||||
def step_then_output_contains(context: Context, text: str) -> None:
|
||||
assert context.er_formatted_output is not None
|
||||
assert text in context.er_formatted_output, (
|
||||
|
||||
Reference in New Issue
Block a user