Skip to content

test(e2e): add get-verification and idempotency steps to api_docs_with_children scenario#890

Merged
rspurgeon merged 2 commits intomainfrom
copilot/add-e2e-verification-idempotency-steps
Apr 25, 2026
Merged

test(e2e): add get-verification and idempotency steps to api_docs_with_children scenario#890
rspurgeon merged 2 commits intomainfrom
copilot/add-e2e-verification-idempotency-steps

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

001-initial-apply in the api_docs_with_children scenario only validated plan changes via expect files — it never confirmed documents were actually persisted on Konnect, and had no idempotency check to catch spurious UPDATE plans on re-apply.

Changes

  • 001-get-sms-api-documents — added after 000-apply; calls get api documents --api-name "SMS API" -o json and asserts sms-errors and sms-authentication are present with status: published, plus total count of 4:

    - select: "[?slug=='sms-errors'] | [0]"
      expect:
        fields:
          slug: sms-errors
          status: published
    - select: "length(@)"
      expect:
        fields:
          "@": 4
  • 002-idempotency — runs plan -f portal.yaml -f apis.yaml --mode apply against the same overlay and asserts total_changes: 0, catching any broken diff logic that would produce spurious UPDATEs on subsequent runs:

    - select: summary
      expect:
        fields:
          total_changes: 0

…ldren e2e scenario

Adds two sub-commands to step 001-initial-apply in the
api_docs_with_children e2e scenario:

1. 001-get-sms-api-documents: Verifies that SMS API documents are
   persisted on Konnect after the initial apply, checking slugs and
   status for sms-errors and sms-authentication, and confirming the
   total document count is 4.

2. 002-idempotency: Runs plan --mode apply with the same config and
   asserts total_changes: 0, confirming no spurious UPDATE plans are
   generated on subsequent runs.

Closes #<issue>
References: portal/visibility step 003-apply-no-op-after-create,
            portal/api_with_attributes step 001-get-apis

Agent-Logs-Url: https://github.com/Kong/kongctl/sessions/9ac4af85-d857-457c-9472-90e098a0941a

Co-authored-by: rspurgeon <10521262+rspurgeon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add e2e get-verification and idempotency steps to api_docs_with_children scenario test(e2e): add get-verification and idempotency steps to api_docs_with_children scenario Apr 25, 2026
Copilot AI requested a review from rspurgeon April 25, 2026 03:09
@rspurgeon rspurgeon marked this pull request as ready for review April 25, 2026 13:52
@rspurgeon rspurgeon requested a review from a team as a code owner April 25, 2026 13:52
Copilot AI review requested due to automatic review settings April 25, 2026 13:52
@rspurgeon rspurgeon requested a review from a team as a code owner April 25, 2026 13:52
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 portal/api_docs_with_children E2E scenario by validating that API documents are actually persisted in Konnect after the initial apply, and by adding an idempotency check to catch unexpected UPDATEs on re-plan.

Changes:

  • Add a post-apply get api documents --api-name "SMS API" -o json verification step asserting expected slugs/statuses and total document count.
  • Add an idempotency plan --mode apply step asserting summary.total_changes: 0 on the same inputs.

Copilot AI temporarily deployed to kongctl-acceptance-2 April 25, 2026 14:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-3 April 25, 2026 14:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-4 April 25, 2026 14:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance-5 April 25, 2026 14:15 Inactive
Copilot AI temporarily deployed to kongctl-acceptance April 25, 2026 14:15 Inactive
@rspurgeon rspurgeon merged commit 2d3680d into main Apr 25, 2026
26 checks passed
@rspurgeon rspurgeon deleted the copilot/add-e2e-verification-idempotency-steps branch April 25, 2026 14:20
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 get-verification and idempotency steps to api_docs_with_children scenario

3 participants