feat(test): add integration test suite for CloudFormation template validation#745
Merged
feat(test): add integration test suite for CloudFormation template validation#745
Conversation
commit: |
Deploys 9 CloudFormation stacks against LocalStack on every PR to catch issues that unit tests cannot — circular resource dependencies, invalid ARN references, and misconfigured IAM policies. Fixtures cover: standard workflow (with tags), express workflow (with loggingConfig and tracingConfig), activities, CloudWatch alarms, notifications (SNS/SQS), schedule events (rate rule and EventBridge Scheduler), CloudWatch events, API Gateway, and noOutput. All fixtures share fixtures/package.json so CI requires only two npm install calls. A base.yml holds shared provider/plugin/package config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25db9e1 to
67de367
Compare
Collaborator
|
This is really nice! |
Collaborator
Author
Note on the dependency changes in this PR
|
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.
Summary
Adds an integration test suite that deploys real CloudFormation stacks to LocalStack on every PR. This catches a class of bugs that unit tests cannot — circular resource dependencies, invalid ARN references, and misconfigured IAM policies that only manifest when CloudFormation evaluates the full dependency graph.
Fixtures
9 fixtures covering all supported plugin features:
basic-state-machineexpress-workflowtype: EXPRESS,loggingConfig,tracingConfigactivitiescloudwatch-alarmsnotificationsschedulecloudwatch-eventapi-gatewayno-outputnoOutput: true(suppresses state machine ARN outputs)Implementation notes
fixtures/package.json— CI requires only twonpm installcallsfixtures/base.ymlholds sharedprovider,plugins,package, andcustomconfig; each fixture only declares what is unique to itpackage.excludeDevDependencies: falseis set inbase.ymlto prevent Serverless Framework v3 from scanning ~25k node_modules files before packaging, which would exhaust the JS heapdocker compose; the workflow waits forcloudformation,s3, andstepfunctionsto be available before deployingStatus
All CI checks green. Currently validates that all fixtures deploy successfully. CloudFormation template assertion (validating specific generated resources) is out of scope for this PR and tracked separately.
Known broken issues (intentionally not covered)
!Reflambda resourceFn::Sub