ec0b7631d0
CI / lint (push) Successful in 12s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 23s
CI / typecheck (push) Successful in 36s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 46s
CI / unit_tests (push) Successful in 3m3s
CI / integration_tests (push) Successful in 3m31s
CI / docker (push) Successful in 40s
CI / coverage (push) Successful in 5m34s
CI / benchmark-publish (push) Successful in 19m15s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 13s
CI / build (pull_request) Successful in 14s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
Renamed src/cleveragents/acp/ to src/cleveragents/a2a/ and all 13 Acp* classes to A2a* per ADR-047 (A2A Standard Adoption). Updated all imports, structlog event names (acp.* → a2a.*), field names (acp_version → a2a_version), and test references across the entire codebase. This is a cosmetic rename only — no behavioral changes. ISSUES CLOSED: #688
104 lines
5.3 KiB
Gherkin
104 lines
5.3 KiB
Gherkin
@phase2 @a2a @server-cli-coverage
|
|
Feature: Server CLI command coverage boost
|
|
As a developer
|
|
I want full test coverage for server.py CLI commands
|
|
So that the server_connect (rich format), server_status, and resolve_server_mode
|
|
error paths are all exercised
|
|
|
|
# -----------------------------------------------------------------------
|
|
# resolve_server_mode — exception paths (lines 58-59)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: resolve_server_mode returns disabled when resolve raises ValueError
|
|
Given a mock config service that raises ValueError on resolve
|
|
When I call resolve_server_mode with the mock
|
|
Then the server mode should be "disabled"
|
|
|
|
Scenario: resolve_server_mode returns disabled when resolve raises KeyError
|
|
Given a mock config service that raises KeyError on resolve
|
|
When I call resolve_server_mode with the mock
|
|
Then the server mode should be "disabled"
|
|
|
|
# -----------------------------------------------------------------------
|
|
# server_connect — rich format output (lines 132-142)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: server_connect renders Rich Panel when format is rich
|
|
Given a mock config service that accepts writes
|
|
When I call server_connect with url "https://rich.example.com" and rich format
|
|
Then the captured console output should contain "Server Connection (Stub)"
|
|
And the captured console output should contain "https://rich.example.com"
|
|
And the captured console output should contain "stubbed"
|
|
And the captured console output should contain "not yet implemented"
|
|
|
|
Scenario: server_connect rich output includes namespace and TLS verify
|
|
Given a mock config service that accepts writes
|
|
When I call server_connect with url "https://ns.example.com" namespace "my-team" tls_verify false and rich format
|
|
Then the captured console output should contain "my-team"
|
|
And the captured console output should contain "False"
|
|
|
|
# -----------------------------------------------------------------------
|
|
# server_status — full function, no URL configured (lines 157-204)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: server_status with json format when no URL is configured
|
|
Given a mock config service that resolves with no server config
|
|
When I call server_status with format "json"
|
|
Then the echoed output should contain "disabled"
|
|
And the echoed output should contain "server_mode"
|
|
|
|
Scenario: server_status with plain format when no URL is configured
|
|
Given a mock config service that resolves with no server config
|
|
When I call server_status with format "plain"
|
|
Then the echoed output should contain "disabled"
|
|
|
|
# -----------------------------------------------------------------------
|
|
# server_status — URL is configured (stubbed mode)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: server_status with json format when URL is configured
|
|
Given a mock config service that resolves with full server config
|
|
When I call server_status with format "json"
|
|
Then the echoed output should contain "stubbed"
|
|
And the echoed output should contain "https://configured.example.com"
|
|
And the echoed output should contain "production"
|
|
|
|
# -----------------------------------------------------------------------
|
|
# server_status — rich format rendering (lines 196-206)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: server_status renders Rich Panel when format is rich and no URL
|
|
Given a mock config service that resolves with no server config
|
|
When I call server_status with format "rich"
|
|
Then the captured console output should contain "Server Status"
|
|
And the captured console output should contain "disabled"
|
|
And the captured console output should contain "(not configured)"
|
|
|
|
Scenario: server_status renders Rich Panel when format is rich and URL is configured
|
|
Given a mock config service that resolves with full server config
|
|
When I call server_status with format "rich"
|
|
Then the captured console output should contain "Server Status"
|
|
And the captured console output should contain "stubbed"
|
|
And the captured console output should contain "https://configured.example.com"
|
|
|
|
# -----------------------------------------------------------------------
|
|
# server_status — exception paths for namespace / tls-verify (lines 168-183)
|
|
# -----------------------------------------------------------------------
|
|
|
|
Scenario: server_status defaults namespace when resolve raises ValueError
|
|
Given a mock config service where namespace resolve raises ValueError
|
|
When I call server_status with format "json"
|
|
Then the echoed output should contain "default"
|
|
|
|
Scenario: server_status defaults tls_verify when resolve raises KeyError
|
|
Given a mock config service where tls-verify resolve raises KeyError
|
|
When I call server_status with format "json"
|
|
Then the echoed output should contain "true"
|
|
|
|
Scenario: server_status defaults all fields when all resolves raise exceptions
|
|
Given a mock config service where all resolves raise exceptions
|
|
When I call server_status with format "json"
|
|
Then the echoed output should contain "disabled"
|
|
And the echoed output should contain "null"
|
|
And the echoed output should contain "default"
|