forked from cleveragents/cleveragents-core
a808c395f9
Add 53 new .feature files and corresponding step definition files targeting uncovered lines identified in build/coverage.xml. Fix AmbiguousStep conflicts in 7 pre-existing step files by disambiguating step text. New tests cover: ACP clients/facade, actor CLI/config, application container, ACMS service/strategies, async worker, automation profile CLI, autonomy guardrail, bridge, change model, config CLI/service, context service, cross-plan correction, database models, decision service, decomposition clustering/service, discovery handler, langchain chat provider, langgraph nodes, materializers, multi-project service, plan apply/CLI/lifecycle/model/ preflight/resume/service, PostgreSQL analyzer, project CLI/context CLI, provider registry, reactive application/route, repositories, resolver handler, resource registry service, resume model, retry patterns, sandbox protocol, server CLI, skill CLI/service, skills registry, subplan execution/service, system CLI, UKO loader, UoW, and YAML template engine. Closes #645
42 lines
2.1 KiB
Gherkin
42 lines
2.1 KiB
Gherkin
Feature: ActorConfiguration.load_yaml_text and defensive paths
|
|
Coverage-boost scenarios targeting uncovered lines in actor/config.py
|
|
|
|
# --- load_yaml_text: JSON null input (lines 50-51) ---
|
|
Scenario: load_yaml_text returns empty dict for JSON null
|
|
When I call load_yaml_text with "null"
|
|
Then the load_yaml_text result should be an empty dict
|
|
|
|
# --- load_yaml_text: JSON non-dict input (lines 52-53) ---
|
|
Scenario: load_yaml_text raises ValueError for a JSON string
|
|
When I call load_yaml_text with a JSON string value
|
|
Then a ValueError with message containing "object" should be raised
|
|
|
|
Scenario: load_yaml_text raises ValueError for a JSON array
|
|
When I call load_yaml_text with a JSON array value
|
|
Then a ValueError with message containing "object" should be raised
|
|
|
|
Scenario: load_yaml_text raises ValueError for a JSON integer
|
|
When I call load_yaml_text with a JSON integer value
|
|
Then a ValueError with message containing "object" should be raised
|
|
|
|
# --- load_yaml_text: valid JSON dict (line 54) ---
|
|
Scenario: load_yaml_text returns parsed dict for valid JSON object
|
|
When I call load_yaml_text with '{"provider": "openai", "model": "gpt-4"}'
|
|
Then the load_yaml_text result should have key "provider" equal to "openai"
|
|
And the load_yaml_text result should have key "model" equal to "gpt-4"
|
|
|
|
Scenario: load_yaml_text returns parsed dict for empty JSON object
|
|
When I call load_yaml_text with '{}'
|
|
Then the load_yaml_text result should be an empty dict
|
|
|
|
# --- load_yaml_text: YAML fallback path ---
|
|
Scenario: load_yaml_text falls back to YAML for non-JSON input
|
|
When I call load_yaml_text with YAML text "provider: openai\nmodel: gpt-4\n"
|
|
Then the load_yaml_text result should have key "provider" equal to "openai"
|
|
|
|
# --- _load_v2_yaml_content: interpolation returns non-dict (line 127) ---
|
|
Scenario: _load_v2_yaml_content raises ValueError when interpolation returns non-dict
|
|
Given _interpolate_env_vars is patched to return a list
|
|
When I call _load_v2_yaml_content with valid YAML via patched interpolation
|
|
Then a ValueError with message containing "object" should be raised
|