Skip to content

test(e2e): add control-plane plan/apply-workflow scenario#845

Merged
rspurgeon merged 3 commits intomainfrom
copilot/add-e2e-scenario-control-plane-workflow
Apr 21, 2026
Merged

test(e2e): add control-plane plan/apply-workflow scenario#845
rspurgeon merged 3 commits intomainfrom
copilot/add-e2e-scenario-control-plane-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

  • Create test/e2e/scenarios/control-plane/plan/apply-workflow/testdata/control-plane.yaml
  • Create test/e2e/scenarios/control-plane/plan/apply-workflow/overlays/001-update/control-plane.yaml
  • Create test/e2e/scenarios/control-plane/plan/apply-workflow/scenario.yaml
  • Fix CI failure: template variables in assertion field keys are not interpolated — replace {{ .vars.cpRef }} with literal cp-plan-apply in both diff --plan assertion steps

Copilot AI changed the title [WIP] Add e2e scenario for control-plane plan-then-apply-plan workflow test(e2e): add control-plane plan/apply-workflow scenario Apr 21, 2026
Copilot AI requested a review from rspurgeon April 21, 2026 02:11
@rspurgeon rspurgeon marked this pull request as ready for review April 21, 2026 02:55
Copilot AI review requested due to automatic review settings April 21, 2026 02:55
@rspurgeon rspurgeon requested review from a team as code owners April 21, 2026 02:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new E2E scenario to cover the control-plane plan → save → diff --plan → apply --plan workflow, mirroring existing workflow coverage for other resource types so regressions in plan serialization/execution are detected.

Changes:

  • Introduces a new control-plane plan/apply workflow scenario with create, update, and idempotency steps.
  • Adds base declarative input for an initial control plane and an overlay to drive an UPDATE plan/apply cycle.
  • Validates both JSON plan/apply outputs and text diff output for the saved plan file.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
test/e2e/scenarios/control-plane/plan/apply-workflow/testdata/control-plane.yaml Base declarative control-plane config for the CREATE portion of the workflow.
test/e2e/scenarios/control-plane/plan/apply-workflow/overlays/001-update/control-plane.yaml Overlay to update description/labels to force an UPDATE plan/apply cycle.
test/e2e/scenarios/control-plane/plan/apply-workflow/scenario.yaml New scenario definition exercising plan-to-file, diff-from-file, apply-from-file, and idempotency assertions.

Copilot AI temporarily deployed to kongctl-acceptance-2 April 21, 2026 03:09 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-4 April 21, 2026 03:09 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-3 April 21, 2026 03:09 Inactive
Copilot AI had a problem deploying to kongctl-acceptance-5 April 21, 2026 03:09 Failure
Copilot AI temporarily deployed to kongctl-acceptance April 21, 2026 03:09 Inactive
@rspurgeon
Copy link
Copy Markdown
Collaborator

@copilot evaluate the failure from this change in workflow 1533

=== RUN   Test_Scenarios/test/e2e/scenarios/control-plane/plan/apply-workflow/scenario.yaml
    scenarios_test.go:77: scenario failed: 001-plan-apply-create/001-diff-plan-text/assert-000: assertion mismatch; see /home/runner/work/kongctl/kongctl/.e2e-artifacts/24700394414-kongctl-acceptance-5/20260421-030959/tests/Test_Scenarios_test_e2e_scenarios_control-plane_plan_apply-workflow_scenario.yaml/steps/001-plan-apply-create/commands/001-diff-plan-text/assertions/assert-000

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 21, 2026

@copilot evaluate the failure from this change in workflow 1533

=== RUN   Test_Scenarios/test/e2e/scenarios/control-plane/plan/apply-workflow/scenario.yaml

...

The failure was caused by using {{ .vars.cpRef }} in the JMESPath assertion field keys of the diff --plan steps — template variables are not interpolated in assertion keys. The observed diff output contained the literal ref cp-plan-apply, but the assertion was matching against the unexpanded template string.

Fixed in 7470b7b by replacing the template placeholders with their literal values (cp-plan-apply) in both diff --plan assertion steps, matching the pattern used in the event-gateway and portal/API scenarios.

Copilot AI temporarily deployed to kongctl-acceptance-5 April 21, 2026 14:13 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-3 April 21, 2026 14:13 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-2 April 21, 2026 14:13 Inactive
Copilot AI temporarily deployed to kongctl-acceptance April 21, 2026 14:13 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-4 April 21, 2026 14:13 Inactive
@rspurgeon rspurgeon merged commit c70c467 into main Apr 21, 2026
23 checks passed
@rspurgeon rspurgeon deleted the copilot/add-e2e-scenario-control-plane-workflow branch April 21, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[e2e-scan] Test: Add e2e scenario for control-plane plan-then-apply-plan workflow

3 participants