Files
cleveragents-core/features/consolidated_cli_misc.feature
T
freemo b2e923173f
CI / lint (pull_request) Successful in 18s
CI / typecheck (pull_request) Successful in 32s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 33s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 2m5s
CI / integration_tests (pull_request) Successful in 2m50s
CI / docker (pull_request) Successful in 15s
CI / coverage (pull_request) Successful in 4m19s
CI / lint (push) Successful in 12s
CI / quality (push) Successful in 18s
CI / security (push) Successful in 30s
CI / build (push) Successful in 22s
CI / typecheck (push) Successful in 58s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m6s
CI / docker (push) Successful in 50s
CI / integration_tests (push) Successful in 3m21s
CI / coverage (push) Successful in 4m12s
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (pull_request) Successful in 24m46s
perf(tests): consolidate 141 trivially small feature files into 34 domain groups
Consolidate 141 BDD feature files that each complete in under 0.1 seconds
into 25 domain-grouped feature files, reducing subprocess count from 339
to ~223. Each consolidated file groups scenarios from the same domain/module
that share step definitions and fixtures. All scenarios are preserved with
clear comment headers indicating their original source file.

This reduces subprocess overhead by ~116 invocations (141 original files
replaced by 25 consolidated files), targeting the 42% of subprocess count
that contributed only 0.2% of actual test runtime.

ISSUES CLOSED: #485
2026-03-02 14:56:13 +00:00

141 lines
6.3 KiB
Gherkin

Feature: Consolidated Cli Misc
Combined scenarios from: cli_config_jinja_port, system_cli_uncovered_branches
# ============================================================
# Originally from: cli_config_jinja_port.feature
# Feature: Actor-first port of v2 CLI/config/Jinja suites
# ============================================================
# ============================================================
# Originally from: system_cli_uncovered_branches.feature
# Feature: System CLI uncovered branches
# ============================================================
Scenario: system cli branch git_sha returns unknown on non-zero exit
Given system cli branch module is loaded
When system cli branch git_sha subprocess returns non-zero exit code
Then system cli branch result should equal "unknown"
# L107-109: DB path exists, compute size
Scenario: system cli branch build_info_data computes db size when file exists
Given system cli branch module is loaded
When system cli branch build_info_data is called with existing database file
Then system cli branch storage db_size should contain "MB"
# L112-113: exception during db size computation
Scenario: system cli branch build_info_data returns unknown on db stat exception
Given system cli branch module is loaded
When system cli branch build_info_data is called with db stat raising exception
Then system cli branch storage db_size should equal "unknown"
# L116-118: log_dir exists with files
Scenario: system cli branch build_info_data computes log size when dir exists
Given system cli branch module is loaded
When system cli branch build_info_data is called with existing log directory
Then system cli branch storage logs should contain "MB"
# L145-147: config exists but not readable
Scenario: system cli branch check_config_file returns ERROR when not readable
Given system cli branch module is loaded
When system cli branch check_config_file is called with unreadable config
Then system cli branch check status should be "error"
And system cli branch check details should be "not readable"
# L166->174 + L174-175: data dir exists but not writable
Scenario: system cli branch check_data_dir returns ERROR when not writable
Given system cli branch module is loaded
When system cli branch check_data_dir is called with non-writable directory
Then system cli branch check status should be "error"
And system cli branch check details should be "not writable"
# L166->174: data dir does not exist
Scenario: system cli branch check_data_dir returns WARN when dir missing
Given system cli branch module is loaded
When system cli branch check_data_dir is called with missing directory
Then system cli branch check status should be "warn"
# L192-194: sqlite DB exists but not writable
Scenario: system cli branch check_database returns ERROR when db not writable
Given system cli branch module is loaded
When system cli branch check_database is called with non-writable sqlite db
Then system cli branch check status should be "error"
And system cli branch check details should be "locked or not writable"
# L257-258: free disk < 0.5 GB
Scenario: system cli branch check_disk_space returns ERROR when critically low
Given system cli branch module is loaded
When system cli branch check_disk_space reports less than half GB free
Then system cli branch check status should be "error"
And system cli branch check details should contain "critically low"
# L263-264: free disk < 1.0 GB
Scenario: system cli branch check_disk_space returns WARN when low
Given system cli branch module is loaded
When system cli branch check_disk_space reports less than one GB free
Then system cli branch check status should be "warn"
And system cli branch check details should contain "low"
# L274-275: OSError in disk check
Scenario: system cli branch check_disk_space returns WARN on OSError
Given system cli branch module is loaded
When system cli branch check_disk_space raises OSError
Then system cli branch check status should be "warn"
And system cli branch check details should be "unable to check"
# L291->300: _check_git subprocess returns non-zero
Scenario: system cli branch check_git returns ERROR on non-zero exit
Given system cli branch module is loaded
When system cli branch check_git subprocess returns non-zero exit code
Then system cli branch check status should be "error"
And system cli branch check details should be "not found"
# L324-325: _check_file_permissions data dir not exists
Scenario: system cli branch check_file_permissions WARN when data dir missing
Given system cli branch module is loaded
When system cli branch check_file_permissions with missing data dir
Then system cli branch check status should be "warn"
And system cli branch check details should be "data dir does not exist"
# L331->333->334: readable but not writable
Scenario: system cli branch check_file_permissions readable not writable
Given system cli branch module is loaded
When system cli branch check_file_permissions with readable not writable dir
Then system cli branch check status should be "error"
And system cli branch check details should be "data dir r"
# L331->333: not readable and not writable (no access)
Scenario: system cli branch check_file_permissions no access
Given system cli branch module is loaded
When system cli branch check_file_permissions with no access dir
Then system cli branch check status should be "error"
And system cli branch check details should be "data dir no access"
# L417->420: render_version_rich with no dependencies
Scenario: system cli branch render_version_rich skips deps panel when empty
Given system cli branch module is loaded
When system cli branch render_version_rich is called with no dependencies
Then system cli branch no exception should be raised
# L448->452: render_info_rich with no storage
Scenario: system cli branch render_info_rich skips storage panel when empty
Given system cli branch module is loaded
When system cli branch render_info_rich is called with no storage
Then system cli branch no exception should be raised