forked from HAL9000/cleveragents-core
49015c6bee
Add --execution-env-priority flag to 'project context set' command, enabling project-level execution environment priority per spec WF17. - Add execution_env_priority field to ContextConfig domain model - Validate flag value against ExecutionEnvPriority enum (fallback/override) - Persist in context_policy_json, preserving existing execution_environment - Display in 'project context show' Execution Environment section - Merge with existing blob to avoid overwriting previously set fields Tests: 9 Behave scenarios, 26 steps. ISSUES CLOSED: #1079
49 lines
2.9 KiB
Gherkin
49 lines
2.9 KiB
Gherkin
Feature: Project context set --execution-env-priority flag (Bug #1079)
|
|
As a developer
|
|
I want to set execution environment priority when using project context set
|
|
So that I can control project-level execution environment precedence per spec §Execution Environment Routing
|
|
|
|
# Bug #1079 is now fixed: the --execution-env-priority flag is implemented.
|
|
# These tests serve as regression tests.
|
|
|
|
Background:
|
|
Given a bug 1079 in-memory database is initialized
|
|
And a project "local/bug1079-app" exists for bug 1079
|
|
|
|
@tdd_issue @tdd_issue_1079
|
|
Scenario: Bug #1079 - project context set accepts --execution-env-priority override
|
|
When I run bug 1079 context set on "local/bug1079-app" with execution_environment "host" and execution_env_priority "override"
|
|
Then the bug 1079 command should succeed
|
|
And the stored bug 1079 execution_env_priority should be "override"
|
|
|
|
@tdd_issue @tdd_issue_1079
|
|
Scenario: Bug #1079 - project context set accepts --execution-env-priority fallback
|
|
When I run bug 1079 context set on "local/bug1079-app" with execution_environment "host" and execution_env_priority "fallback"
|
|
Then the bug 1079 command should succeed
|
|
And the stored bug 1079 execution_env_priority should be "fallback"
|
|
|
|
@tdd_issue @tdd_issue_1079
|
|
Scenario: Bug #1079 - project context set rejects --execution-env-priority without --execution-environment
|
|
When I run bug 1079 context set on "local/bug1079-app" with execution_env_priority "override" but no execution_environment
|
|
Then the bug 1079 command should fail
|
|
And the bug 1079 output should contain "--execution-env-priority requires --execution-environment"
|
|
|
|
@tdd_issue @tdd_issue_1079
|
|
Scenario: Bug #1079 - project context set defaults execution-env-priority to fallback when not specified
|
|
When I run bug 1079 context set on "local/bug1079-app" with execution_environment "host" but no execution_env_priority
|
|
Then the bug 1079 command should succeed
|
|
And the stored bug 1079 execution_env_priority should be "fallback"
|
|
|
|
@tdd_issue @tdd_issue_1079
|
|
Scenario: Bug #1079 - project context set rejects invalid --execution-env-priority value
|
|
When I run bug 1079 context set on "local/bug1079-app" with execution_environment "host" and execution_env_priority "invalid-value"
|
|
Then the bug 1079 command should fail
|
|
And the bug 1079 output should contain "Invalid execution env priority"
|
|
@tdd_issue @tdd_issue_1079
|
|
Scenario: Bug #1079 - project context show reflects persisted execution-env-priority
|
|
When I run bug 1079 context set on "local/bug1079-app" with execution_environment "host" and execution_env_priority "override"
|
|
Then the bug 1079 command should succeed
|
|
When I run bug 1079 context show on "local/bug1079-app" with format "json"
|
|
Then the bug 1079 command should succeed
|
|
And the bug 1079 json output should include "execution_env_priority" as "override"
|