3bd02a7c6e
Add CLI command group `agents automation-profile` with add, remove, list, and show subcommands for managing automation profiles that control plan execution autonomy. Changes: - New `automation_profile.py` CLI module with YAML config input, schema_version guard, namespaced name validation, --update support, and all output formats (json/yaml/plain/table/rich) - Register automation-profile in main CLI app - Add deprecation warnings for --automation-level on plan use and set-automation-level commands - Update CLI reference docs with command examples, built-in profiles list, and deprecation notes - 26 Behave scenarios covering all commands and error paths - 9 Robot Framework integration smoke tests - ASV benchmarks for CLI parsing performance - Mark A6.cli items complete in implementation_plan.md
80 lines
3.2 KiB
Gherkin
80 lines
3.2 KiB
Gherkin
Feature: System commands coverage boost
|
|
As a developer
|
|
I want to cover remaining branches in system.py
|
|
So that coverage reaches the 97% threshold
|
|
|
|
Scenario: git sha returns unknown when git not available
|
|
Given a system module for coverage testing
|
|
When I call git_sha with git not on path
|
|
Then the git sha should be "unknown"
|
|
|
|
Scenario: dep_version returns not installed for missing package
|
|
Given a system module for coverage testing
|
|
When I call dep_version for a missing package
|
|
Then the dep version should be "not installed"
|
|
|
|
Scenario: build_info_data with missing database path
|
|
Given a system module for coverage testing
|
|
When I call build_info_data with no database file
|
|
Then the info data should contain db_size as "0 MB"
|
|
|
|
Scenario: build_info_data with missing log directory
|
|
Given a system module for coverage testing
|
|
When I call build_info_data with no log directory
|
|
Then the info data should contain logs as "0 MB"
|
|
|
|
Scenario: check_data_dir with non-existent dir
|
|
Given a system module for coverage testing
|
|
When I call check_data_dir with non-existent directory
|
|
Then the check result should have WARN status
|
|
|
|
Scenario: check_database with non-sqlite URL
|
|
Given a system module for coverage testing
|
|
When I call check_database with postgres URL
|
|
Then the check result should have OK status and details "configured"
|
|
|
|
Scenario: check_database with missing parent dir
|
|
Given a system module for coverage testing
|
|
When I call check_database with sqlite and non-writable parent
|
|
Then the check result should have ERROR status
|
|
|
|
Scenario: check_file_permissions with non-existent data dir
|
|
Given a system module for coverage testing
|
|
When I call check_file_permissions with non-existent directory
|
|
Then the check result should have WARN status
|
|
|
|
Scenario: check_file_permissions with read-only data dir
|
|
Given a system module for coverage testing
|
|
When I call check_file_permissions with read-only directory
|
|
Then the file perm result status should not be OK
|
|
|
|
Scenario: check_git when git is unavailable
|
|
Given a system module for coverage testing
|
|
When I call check_git with git unavailable
|
|
Then the check result should have ERROR status
|
|
|
|
Scenario: render_version_rich produces output
|
|
Given a system module for coverage testing
|
|
When I call render_version_rich with sample data
|
|
Then no system exception should be raised
|
|
|
|
Scenario: render_info_rich produces output
|
|
Given a system module for coverage testing
|
|
When I call render_info_rich with sample data
|
|
Then no system exception should be raised
|
|
|
|
Scenario: render_diagnostics_rich with errors
|
|
Given a system module for coverage testing
|
|
When I call render_diagnostics_rich with error data
|
|
Then no system exception should be raised
|
|
|
|
Scenario: render_diagnostics_rich with warnings only
|
|
Given a system module for coverage testing
|
|
When I call render_diagnostics_rich with warning data
|
|
Then no system exception should be raised
|
|
|
|
Scenario: render_diagnostics_rich with all OK
|
|
Given a system module for coverage testing
|
|
When I call render_diagnostics_rich with all OK data
|
|
Then no system exception should be raised
|