Tests: Significantly improved coverage of the unit tests
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 28s
CI / typecheck (pull_request) Successful in 32s
CI / integration_tests (pull_request) Successful in 2m39s
CI / unit_tests (pull_request) Successful in 5m22s
CI / docker (pull_request) Successful in 38s
CI / benchmark-regression (pull_request) Successful in 17m47s
CI / coverage (pull_request) Successful in 19m6s
CI / lint (push) Successful in 14s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 20s
CI / security (push) Successful in 29s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 3m23s
CI / unit_tests (push) Successful in 9m12s
CI / docker (push) Successful in 16s
CI / benchmark-publish (push) Successful in 10m4s
CI / coverage (push) Successful in 19m27s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 28s
CI / typecheck (pull_request) Successful in 32s
CI / integration_tests (pull_request) Successful in 2m39s
CI / unit_tests (pull_request) Successful in 5m22s
CI / docker (pull_request) Successful in 38s
CI / benchmark-regression (pull_request) Successful in 17m47s
CI / coverage (pull_request) Successful in 19m6s
CI / lint (push) Successful in 14s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 20s
CI / security (push) Successful in 29s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 3m23s
CI / unit_tests (push) Successful in 9m12s
CI / docker (push) Successful in 16s
CI / benchmark-publish (push) Successful in 10m4s
CI / coverage (push) Successful in 19m27s
This commit was merged in pull request #139.
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
Feature: Plan diff and artifacts CLI command coverage
|
||||
As a developer
|
||||
I want to cover the plan diff, plan artifacts CLI commands and remaining branches
|
||||
So that plan.py lines 1815-1888 and missing branches are fully covered
|
||||
|
||||
# ---------- plan diff CLI command (lines 1845-1855) ----------
|
||||
|
||||
Scenario: plan_diff_artifacts successful diff prints output
|
||||
Given plan_diff_artifacts the apply service returns diff output "--- a/file.py\n+++ b/file.py"
|
||||
When plan_diff_artifacts I run the diff subcommand for plan "plan-001"
|
||||
Then plan_diff_artifacts the exit code should be 0
|
||||
And plan_diff_artifacts the output should contain "file.py"
|
||||
|
||||
Scenario: plan_diff_artifacts diff with custom format
|
||||
Given plan_diff_artifacts the apply service returns diff output '{"entries": []}'
|
||||
When plan_diff_artifacts I run the diff subcommand for plan "plan-002" using format "json"
|
||||
Then plan_diff_artifacts the exit code should be 0
|
||||
And plan_diff_artifacts the output should contain "entries"
|
||||
|
||||
Scenario: plan_diff_artifacts diff raises PlanError
|
||||
Given plan_diff_artifacts the apply service diff raises a PlanError "changeset not found"
|
||||
When plan_diff_artifacts I run the diff subcommand for plan "plan-bad"
|
||||
Then plan_diff_artifacts the command should be aborted
|
||||
And plan_diff_artifacts the output should contain "Diff Error"
|
||||
And plan_diff_artifacts the output should contain "changeset not found"
|
||||
|
||||
Scenario: plan_diff_artifacts diff raises CleverAgentsError
|
||||
Given plan_diff_artifacts the apply service diff raises a CleverAgentsError "service unavailable"
|
||||
When plan_diff_artifacts I run the diff subcommand for plan "plan-err"
|
||||
Then plan_diff_artifacts the command should be aborted
|
||||
And plan_diff_artifacts the output should contain "Error"
|
||||
And plan_diff_artifacts the output should contain "service unavailable"
|
||||
|
||||
# ---------- plan artifacts CLI command (lines 1878-1888) ----------
|
||||
|
||||
Scenario: plan_diff_artifacts successful artifacts prints output
|
||||
Given plan_diff_artifacts the apply service returns artifacts output "changeset-id: cs-001"
|
||||
When plan_diff_artifacts I run the artifacts subcommand for plan "plan-001"
|
||||
Then plan_diff_artifacts the exit code should be 0
|
||||
And plan_diff_artifacts the output should contain "cs-001"
|
||||
|
||||
Scenario: plan_diff_artifacts artifacts with custom format
|
||||
Given plan_diff_artifacts the apply service returns artifacts output '{"changeset_id": "cs-002"}'
|
||||
When plan_diff_artifacts I run the artifacts subcommand for plan "plan-003" using format "json"
|
||||
Then plan_diff_artifacts the exit code should be 0
|
||||
And plan_diff_artifacts the output should contain "cs-002"
|
||||
|
||||
Scenario: plan_diff_artifacts artifacts raises PlanError
|
||||
Given plan_diff_artifacts the apply service artifacts raises a PlanError "plan not found"
|
||||
When plan_diff_artifacts I run the artifacts subcommand for plan "plan-missing"
|
||||
Then plan_diff_artifacts the command should be aborted
|
||||
And plan_diff_artifacts the output should contain "Artifacts Error"
|
||||
And plan_diff_artifacts the output should contain "plan not found"
|
||||
|
||||
Scenario: plan_diff_artifacts artifacts raises CleverAgentsError
|
||||
Given plan_diff_artifacts the apply service artifacts raises a CleverAgentsError "timeout"
|
||||
When plan_diff_artifacts I run the artifacts subcommand for plan "plan-timeout"
|
||||
Then plan_diff_artifacts the command should be aborted
|
||||
And plan_diff_artifacts the output should contain "Error"
|
||||
And plan_diff_artifacts the output should contain "timeout"
|
||||
|
||||
# ---------- _get_apply_service (lines 1815-1822) ----------
|
||||
|
||||
Scenario: plan_diff_artifacts _get_apply_service creates PlanApplyService
|
||||
Given plan_diff_artifacts a mock lifecycle service
|
||||
When plan_diff_artifacts I call _get_apply_service
|
||||
Then plan_diff_artifacts a PlanApplyService should be returned
|
||||
|
||||
# ---------- build command branch: no actor_registry (L646->648) ----------
|
||||
|
||||
Scenario: plan_diff_artifacts build command without actor registry
|
||||
Given plan_diff_artifacts a container without actor_registry
|
||||
When plan_diff_artifacts I invoke the build command
|
||||
Then plan_diff_artifacts the build should complete without actor registry calls
|
||||
|
||||
# ---------- build command branch: testing_mode disabled (L648->652) ----------
|
||||
|
||||
Scenario: plan_diff_artifacts build command with testing mode disabled
|
||||
Given plan_diff_artifacts a container with actor_registry but testing mode disabled
|
||||
When plan_diff_artifacts I invoke the build command
|
||||
Then plan_diff_artifacts ensure_default_mock_actor should not be called
|
||||
|
||||
# ---------- plan show: arguments_order with extra key (L1130->1129) ----------
|
||||
|
||||
Scenario: plan_diff_artifacts plan show with arguments_order containing missing key
|
||||
Given plan_diff_artifacts a lifecycle plan with arguments_order having an extra key
|
||||
When plan_diff_artifacts I print the lifecycle plan
|
||||
Then plan_diff_artifacts the output should contain the valid argument
|
||||
And plan_diff_artifacts the output should not contain the missing key value
|
||||
Reference in New Issue
Block a user