6a922719ef
CI / helm (pull_request) Successful in 59s
CI / push-validation (pull_request) Successful in 1m24s
CI / build (pull_request) Successful in 1m19s
CI / typecheck (pull_request) Successful in 1m50s
CI / lint (pull_request) Failing after 1m25s
CI / quality (pull_request) Successful in 1m53s
CI / security (pull_request) Successful in 2m6s
CI / integration_tests (pull_request) Successful in 4m0s
CI / unit_tests (pull_request) Failing after 6m44s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
Fixing the code coverage. ISSUES CLOSED: #10878
38 lines
1.5 KiB
Gherkin
38 lines
1.5 KiB
Gherkin
Feature: CLI main() error handling paths
|
|
As a developer
|
|
I want to cover the error-handling branches in cleveragents.cli.main
|
|
So that convert_exit_code(), subcommand import failure, and config validation are exercised
|
|
|
|
@coverage
|
|
Scenario: invalid --config-path that is a directory is rejected
|
|
When I run CLI with arguments ["--config-path", "/tmp", "version"]
|
|
Then the main cli exit code should be 1
|
|
And the main cli output contains "is not a file"
|
|
|
|
@coverage
|
|
Scenario: unknown command returns exit code 2
|
|
When I run CLI with arguments ["this_is_not_a_command"]
|
|
Then the main cli exit code should be 2
|
|
And the main cli output contains "Invalid command 'this_is_not_a_command'"
|
|
|
|
# These tests call convert_exit_code and _print_basic_help directly
|
|
@coverage
|
|
Scenario: convert_exit_code(None) returns 0
|
|
When the main exit-code converter is called with the value "None"
|
|
Then the main convert_exit_code result is "0"
|
|
|
|
@coverage
|
|
Scenario: convert_exit_code(int -1) returns -1 for negative codes
|
|
When the main exit-code converter is called with the value "-1"
|
|
Then the main convert_exit_code result is "-1"
|
|
|
|
@coverage
|
|
Scenario: convert_exit_code(string "abc") returns 1 for unparseable
|
|
When the main exit-code converter is called with the value "abc"
|
|
Then the main convert_exit_code result is "1"
|
|
|
|
@coverage
|
|
Scenario: _print_basic_help prints without error
|
|
When I call the main _print_basic_help
|
|
Then the main _print_basic_help completes ok
|