ca1c341b18
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
115 lines
5.8 KiB
Gherkin
115 lines
5.8 KiB
Gherkin
Feature: System CLI uncovered branches
|
|
Cover remaining missed lines and branches in system.py
|
|
|
|
# L50->54: git rev-parse returns non-zero exit code
|
|
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
|