a2a-source-edit: write tests/test_agent.py
This commit is contained in:
@@ -93,8 +93,8 @@ async def test_execute_requires_acknowledgement(ctx, workspace):
|
||||
async def test_plan_never_executes_and_execution_dry_run_default(ctx, workspace):
|
||||
agent = ProductionIncidentCommander()
|
||||
plan = await agent.plan_remediation(ctx, incident_id="inc-002", objective="rollback the bad image deployment")
|
||||
assert plan.steps
|
||||
assert all(step.action_type != "shell" for step in plan.steps)
|
||||
assert plan["steps"]
|
||||
assert all(step["action_type"] != "shell" for step in plan["steps"])
|
||||
text = workspace.read_bytes("outputs/incidents/inc-002/remediation-plan.json").decode()
|
||||
assert "rollback" in text.lower()
|
||||
result = await agent.execute_remediation(
|
||||
|
||||
Reference in New Issue
Block a user