56f424714c
CI / lint (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 51s
CI / security (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 33s
CI / build (pull_request) Successful in 28s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 6m40s
CI / e2e_tests (pull_request) Successful in 17m40s
CI / integration_tests (pull_request) Successful in 23m10s
CI / coverage (pull_request) Successful in 10m58s
CI / docker (pull_request) Successful in 1m20s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m50s
Audit all feature files for non-compliant @tdd_bug tag usage and replace with the CONTRIBUTING.md-specified @tdd_issue / @tdd_issue_<N> tags. Three files were affected: - features/tdd_actor_list_no_db_update.feature: @tdd_bug @tdd_bug_797 → @tdd_issue @tdd_issue_797 (bug #797 is fixed; permanent regression guard, no @tdd_expected_fail) - features/tdd_exec_env_resolution_precedence.feature: Removed duplicate @tdd_bug @tdd_bug_1080 tags; file already had the correct @tdd_issue @tdd_issue_1080 tags. - features/tdd_use_action_automation_profile.feature: @tdd_bug @tdd_bug_1076 → @tdd_issue @tdd_issue_1076 (bug #1076 is fixed in upstream; @tdd_expected_fail not needed) Zero occurrences of @tdd_bug or @tdd_bug_<N> remain in features/. All nox quality gates pass: lint ✅ unit_tests ✅ (14426 scenarios passed). ISSUES CLOSED: #2779
69 lines
3.8 KiB
Gherkin
69 lines
3.8 KiB
Gherkin
@tdd_issue @tdd_issue_1076
|
|
Feature: TDD Bug #1076 — use_action() does not propagate automation_profile to Plan
|
|
As a developer
|
|
I want to verify that use_action() resolves the automation profile
|
|
from the precedence chain and sets it on the created Plan
|
|
So that the bug is captured and will be caught by a regression test
|
|
|
|
Per the specification (docs/specification.md):
|
|
|
|
- Line 18919: "The resolved automation profile name for this plan [...]
|
|
Determined at `plan use` time using the profile precedence rules
|
|
(plan > action > project > global). Once set, it is locked to the plan."
|
|
|
|
- Line 18967: "2. The plan's automation profile is resolved
|
|
(plan > action > project > global precedence)"
|
|
|
|
Currently, PlanLifecycleService.use_action() constructs the Plan without
|
|
passing automation_profile to the Plan() constructor. The Plan's
|
|
automation_profile field is always None regardless of the action's
|
|
automation_profile value or any other configuration source.
|
|
|
|
These tests assert the expected behavior and will FAIL until the bug is
|
|
fixed. The @tdd_expected_fail tag inverts the result so CI passes.
|
|
|
|
# Bug #1076 — captures the test for automation_profile propagation from
|
|
# the Action to the Plan via use_action(). Uses @tdd_expected_fail until
|
|
# the fix in #1076 is merged.
|
|
|
|
Scenario: Plan inherits automation_profile from action when action has a profile set
|
|
Given a plan lifecycle service for automation profile testing
|
|
And an available action "local/profiled-action" with automation_profile "full-auto"
|
|
When I use the profiled action on project "test-project"
|
|
Then the created plan automation_profile should not be None
|
|
And the created plan automation_profile name should be "full-auto"
|
|
And the created plan automation_profile provenance should be "action"
|
|
|
|
Scenario: Plan gets project-scoped automation_profile when action has no profile
|
|
Given a plan lifecycle service for automation profile testing
|
|
And an available action "local/project-config-action" without automation_profile
|
|
And a project-scoped automation_profile "trusted" for project "configured-project"
|
|
When I use the unprofiled action on configured project "configured-project"
|
|
Then the created plan automation_profile should not be None
|
|
And the created plan automation_profile name should be "trusted"
|
|
And the created plan automation_profile provenance should be "project"
|
|
|
|
Scenario: Plan gets global default automation_profile when action has no profile
|
|
Given a plan lifecycle service for automation profile testing
|
|
And an available action "local/unprofiled-action" without automation_profile
|
|
When I use the unprofiled action on project "test-project"
|
|
Then the created plan automation_profile should not be None
|
|
And the created plan automation_profile name should be "supervised"
|
|
And the created plan automation_profile provenance should be "global"
|
|
|
|
Scenario: Plan falls back to settings default when config service raises an error
|
|
Given a plan lifecycle service with a broken config service
|
|
And an available action "local/fallback-action" without automation_profile
|
|
When I use the unprofiled action on project "test-project"
|
|
Then the created plan automation_profile should not be None
|
|
And the created plan automation_profile name should be "manual"
|
|
And the created plan automation_profile provenance should be "global"
|
|
|
|
Scenario: Plan-level profile overrides action-level profile
|
|
Given a plan lifecycle service for automation profile testing
|
|
And an available action "local/override-action" with automation_profile "full-auto"
|
|
When I use the action with plan-level profile "ci" on project "test-project"
|
|
Then the created plan automation_profile should not be None
|
|
And the created plan automation_profile name should be "ci"
|
|
And the created plan automation_profile provenance should be "plan"
|