Skip to content

test(e2e): strengthen post-sync field assertions in control-plane sync scenario#844

Merged
rspurgeon merged 3 commits intomainfrom
copilot/strengthen-post-sync-assertions
Apr 21, 2026
Merged

test(e2e): strengthen post-sync field assertions in control-plane sync scenario#844
rspurgeon merged 3 commits intomainfrom
copilot/strengthen-post-sync-assertions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

The 002-sync-with-delete sync step only verified existence of kongctl-e2e-cp-2 by name after sync, leaving description and cluster_type unasserted — a regression in either field would pass undetected.

Changes

  • 001-002-verify-post-sync — extended the existing list-based assertions for kongctl-e2e-cp-2 to also assert description and config.cluster_type, using JMESPath selects on the same list response:
- select: "[?name=='kongctl-e2e-cp-2'] | [0]"
  expect:
    fields:
      name: "kongctl-e2e-cp-2"
      description: "Second Test Control Plane for E2E testing via kongctl"
- select: "[?name=='kongctl-e2e-cp-2'] | [0].config.cluster_type"
  expect:
    fields:
      "@": "CLUSTER_TYPE_CONTROL_PLANE"

No overlay or testdata changes — pure assertion additions in the existing verification step, consistent with the apply scenario's 002-001-verify-fields pattern.

Copilot AI changed the title [WIP] Update post-sync field assertions in control-plane sync scenario test(e2e): strengthen post-sync field assertions in control-plane sync scenario Apr 21, 2026
Copilot AI requested a review from rspurgeon April 21, 2026 02:08
@rspurgeon rspurgeon marked this pull request as ready for review April 21, 2026 02:55
@rspurgeon rspurgeon requested review from a team as code owners April 21, 2026 02:55
Copilot AI review requested due to automatic review settings 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

This PR strengthens the E2E “control-plane sync” scenario by asserting additional fields after the sync-with-delete step, reducing the chance of regressions slipping through when the control plane still exists but key fields are wrong.

Changes:

  • Extend the existing post-sync list assertion for kongctl-e2e-cp-2 to also validate description.
  • Add a new post-sync “get by name” verification command to assert description and config.cluster_type from the single-resource JSON output.

@rspurgeon
Copy link
Copy Markdown
Collaborator

@copilot this scenario change adds a second kongctl get command to check the values of the same object. Instead, how about extending the assertions in the existing 001-002-verify-post-sync step instead of authoring an entirely new step with a redundant 'kongctl get' to retrieve essentially the same data as the prior step.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 21, 2026

@copilot this scenario change adds a second kongctl get command to check the values of the same object. Instead, how about extending the assertions in the existing 001-002-verify-post-sync step instea...

Done in 534d533. Removed the separate 002-002-verify-created-fields step and consolidated config.cluster_type into the existing 001-002-verify-post-sync step using a JMESPath select on the same list response: [?name=='kongctl-e2e-cp-2'] | [0].config.cluster_type.

Copilot AI temporarily deployed to kongctl-acceptance-3 April 21, 2026 03:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance April 21, 2026 03:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-5 April 21, 2026 03:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-2 April 21, 2026 03:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-4 April 21, 2026 03:15 Inactive
@rspurgeon rspurgeon merged commit c9e3ee6 into main Apr 21, 2026
23 checks passed
@rspurgeon rspurgeon deleted the copilot/strengthen-post-sync-assertions branch April 21, 2026 13:48
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: Strengthen post-sync field assertions in control-plane sync scenario

3 participants