forked from HAL9000/cleveragents-core
103 lines
4.0 KiB
Gherkin
103 lines
4.0 KiB
Gherkin
Feature: Config Parser Missing Lines Coverage
|
|
As a developer
|
|
I want to cover all missing lines in config_parser.py
|
|
So that we achieve 90%+ coverage
|
|
|
|
Background:
|
|
Given I have a config parser for missing lines testing
|
|
|
|
Scenario: Test merge configs with None values (line 123)
|
|
Given I have configs where one is None
|
|
When I merge the configs with None handling
|
|
Then the None config should be handled correctly
|
|
|
|
Scenario: Test dictionary merging (lines 126-131)
|
|
Given I have configs with dict and list merging scenarios
|
|
When I merge configs with different value types
|
|
Then all merge scenarios should be handled
|
|
|
|
Scenario: Test environment variable interpolation edge cases (lines 146-165)
|
|
Given I have environment variables requiring edge case handling
|
|
When I interpolate environment variables with edge cases
|
|
Then all edge case scenarios should be processed
|
|
|
|
Scenario: Test type conversions (lines 171, 173, 175)
|
|
Given I have string values requiring type conversion
|
|
When I convert the string values to appropriate types
|
|
Then boolean, integer, and float conversions should work
|
|
|
|
Scenario: Test template strings processing (lines 190-196)
|
|
Given I have a config with template_strings section
|
|
When I process template strings into templates
|
|
Then template_strings should be converted to templates with markers
|
|
|
|
Scenario: Test template instance agent creation (line 210)
|
|
Given I have an agent with template configuration
|
|
When I create a template instance agent
|
|
Then the agent should be marked as template_instance type
|
|
|
|
Scenario: Test invalid route type validation (lines 235-236)
|
|
Given I have a route with invalid type
|
|
When I validate the route type
|
|
Then a configuration error should be raised for invalid type
|
|
|
|
Scenario: Test route template instance (line 244)
|
|
Given I have a route with template configuration
|
|
When I create a route template instance
|
|
Then the route should have template_config set
|
|
|
|
Scenario: Test bridge config edge cases (lines 327-328)
|
|
Given I have bridge configurations with missing optional fields
|
|
When I parse bridge configurations with defaults
|
|
Then default bridge values should be used
|
|
|
|
Scenario: Test validation error scenarios (lines 385-398, 406)
|
|
Given I have configurations with various validation issues
|
|
When I validate configurations with errors
|
|
Then specific validation errors should be raised
|
|
|
|
Scenario: Test merge validation (lines 418, 421, 425)
|
|
Given I have merge operations with validation issues
|
|
When I validate merge operations with errors
|
|
Then merge validation errors should be raised
|
|
|
|
Scenario: Test split validation (lines 435, 438, 441)
|
|
Given I have split operations with validation issues
|
|
When I validate split operations with errors
|
|
Then split validation errors should be raised
|
|
|
|
Scenario: Test pipeline validation warnings (lines 461, 469)
|
|
Given I have pipeline configurations with warning scenarios
|
|
When I validate pipeline configurations with warnings
|
|
Then warnings should be logged but not fail validation
|
|
|
|
@skip
|
|
Scenario: Empty merge sources in configuration
|
|
Given a config with empty merge sources
|
|
When loading the configuration
|
|
Then config loads without merge
|
|
|
|
@skip
|
|
Scenario: Empty split targets in configuration
|
|
Given a config with empty split targets
|
|
When loading the configuration
|
|
Then config loads without split
|
|
|
|
@skip
|
|
Scenario: Route with failing template instantiation
|
|
Given a config with invalid route template
|
|
When loading the configuration
|
|
Then route uses fallback config
|
|
|
|
Scenario: Graph with invalid state class
|
|
Given a config with invalid state class path
|
|
When loading the configuration
|
|
Then warning is logged about state class
|
|
And graph is created without state class
|
|
|
|
@skip
|
|
Scenario: String templates in config
|
|
Given a config with string instead of dict templates
|
|
When loading the configuration
|
|
Then string templates are skipped
|
|
And no errors occur |