test(cli-integ): remove integ test asserting CloudFormation drift-detection coverage - #1900
Merged
mrgrain merged 1 commit intoAug 26, 2026
Conversation
…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.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rix0rrr
approved these changes
Aug 26, 2026
mrgrain
deleted the
mrgrain/test/cli-integ/remove-drift-unchecked-count-test
branch
August 26, 2026 12:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every PR currently fails the
cli-integ-testssuite oncdk 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 forAWS::EC2::SubnetRouteTableAssociationandAWS::EC2::VPCGatewayAttachment. CloudFormation now returnsIN_SYNCdrift records for both types (verified against the live API with a minimal stack; the documented support table still saysNoand 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
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license