Skip to content

test(cli-integ): remove integ test asserting CloudFormation drift-detection coverage - #1900

Merged
mrgrain merged 1 commit into
mainfrom
mrgrain/test/cli-integ/remove-drift-unchecked-count-test
Aug 26, 2026
Merged

test(cli-integ): remove integ test asserting CloudFormation drift-detection coverage#1900
mrgrain merged 1 commit into
mainfrom
mrgrain/test/cli-integ/remove-drift-unchecked-count-test

Conversation

@mrgrain

@mrgrain mrgrain commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Every PR currently fails the cli-integ-tests suite on cdk drift --verbose shows unchecked resources. The test asserts that drift detection reports exactly (3 unchecked) resources for a VPC stack — relying on CloudFormation not supporting drift detection for AWS::EC2::SubnetRouteTableAssociation and AWS::EC2::VPCGatewayAttachment. CloudFormation now returns IN_SYNC drift records for both types (verified against the live API with a minimal stack; the documented support table still says No and is stale), so the unchecked count is legitimately zero and the assertion fails deterministically, on every branch, since 2026-08-25.

The count is a property of CloudFormation's drift-detection coverage, not of the CLI, so any hardcoded expectation will break again whenever coverage expands. This removes the integ test and pins the behavior with unit tests instead: the formatter classification (missing record → unchecked, UNKNOWN → unchecked) was already covered, and this adds action-level tests for the (N unchecked) suffix on the drift summary — the only behavior that was exercised solely by the integ test.

Fixes #

Checklist

  • This change contains a major version upgrade for a dependency and I confirm all breaking changes are addressed
    • Release notes for the new version:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…ection coverage

The test asserted that `cdk drift` reports exactly '(3 unchecked)'
resources for a VPC stack, relying on CloudFormation NOT supporting
drift detection for AWS::EC2::SubnetRouteTableAssociation and
AWS::EC2::VPCGatewayAttachment. CloudFormation now returns IN_SYNC
drift records for both types (verified against the live API on
2026-08-26), so the count dropped to zero and the test fails
deterministically on every PR.

The count is a property of CloudFormation's drift-detection coverage,
not of the CLI, so any hardcoded expectation will break again as
coverage expands. The unchecked-resources rendering is instead pinned
by unit tests: the formatter classification was already covered, and
this change adds action-level tests for the '(N unchecked)' suffix in
the drift summary, which was the only behavior exercised solely by the
integ test.
@mrgrain
mrgrain deployed to automation August 26, 2026 11:34 — with GitHub Actions Active
@mrgrain
mrgrain deployed to automation August 26, 2026 11:34 — with GitHub Actions Active
@mrgrain
mrgrain deployed to no-approval August 26, 2026 11:34 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@aws-cdk-automation
aws-cdk-automation requested a review from a team August 26, 2026 11:34
@github-actions github-actions Bot added the p2 label Aug 26, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.30%. Comparing base (793316b) to head (ddcf5e4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1900      +/-   ##
==========================================
+ Coverage   91.27%   91.30%   +0.03%     
==========================================
  Files          79       79              
  Lines       12139    12139              
  Branches     1720     1722       +2     
==========================================
+ Hits        11080    11084       +4     
+ Misses       1024     1020       -4     
  Partials       35       35              
Flag Coverage Δ
suite.unit 91.30% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mrgrain
mrgrain added this pull request to the merge queue Aug 26, 2026
Merged via the queue into main with commit 25ca63c Aug 26, 2026
46 checks passed
@mrgrain
mrgrain deleted the mrgrain/test/cli-integ/remove-drift-unchecked-count-test branch August 26, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants