Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change name of integ test snapshot directories in preparation of multi-language integration tests #22716

Merged
merged 7 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Work your magic. Here are some guidelines:

Integration tests perform a few functions in the CDK code base -
1. Acts as a regression detector. It does this by running `cdk synth` on the integration test and comparing it against
the `*.integ.snapshot` directory. This highlights how a change affects the synthesized stacks.
the `*.snapshot` directory. This highlights how a change affects the synthesized stacks.
2. Allows for a way to verify if the stacks are still valid CloudFormation templates, as part of an intrusive change.
This is done by running `yarn integ` which will run `cdk deploy` across all of the integration tests in that package. If you are developing a new integration test or for some other reason want to work on a single integration test over and over again without running through all the integration tests you can do so using `yarn integ integ.test-name.js`
Remember to set up AWS credentials before doing this.
Expand Down
4 changes: 2 additions & 2 deletions INTEGRATION_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on what type of changes require integrations tests and how you should write inte
All Construct libraries in the CDK code base have integration tests that serve to -

1. Acts as a regression detector. It does this by running `cdk synth` on the integration test and comparing it against
the Cloud Assembly stored in the snapshot (`*.integ.snapshot/`) directory. This highlights how a change affects the synthesized stacks.
the Cloud Assembly stored in the snapshot (`*.snapshot/`) directory. This highlights how a change affects the synthesized stacks.
2. Allows for a way to verify if the stacks are still valid CloudFormation templates, as part of an intrusive change.
This is done by running `yarn integ` which will run `cdk deploy` across all of the integration tests in that package.
If you are developing a new integration test or for some other reason want to work on a single integration test
Expand Down Expand Up @@ -115,7 +115,7 @@ This will:
1. Synthesize the CDK app
2. `cdk deploy` to your AWS account
3. `cdk destroy` to delete the stack
4. Save a snapshot of the Cloud Assembly to `lambda.integ.snapshot/`
4. Save a snapshot of the Cloud Assembly to `integ.lambda.js.snapshot/`

Now when you run `npm test` it will synth the integ app and compare the result with the snapshot.
If the snapshot has changed the same process must be followed to update the snapshot.
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/alexa-ask/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tsconfig.json
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/alexa-ask/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ jest.config.js
junit.xml
test/
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/app-delivery/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ coverage

junit.xml
!jest.config.js
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/app-delivery/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ junit.xml
test/
!*.lit.ts
jest.config.js
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/assert-internal/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ nyc.config.js
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/assert-internal/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ jest.config.js
**/cdk.out
junit.xml
test/
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/assert/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ junit.xml
README.md
jest.ts

!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/assert/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ jest.config.js
**/cdk.out
junit.xml
test/
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/assertions/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tsconfig.json
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/assertions/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ test/
!.jsii
!*.js
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/assets/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nyc.config.js

junit.xml
!jest.config.js
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/assets/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ junit.xml
test/
!*.lit.ts
jest.config.js
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-accessanalyzer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tsconfig.json
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-accessanalyzer/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ jest.config.js
junit.xml
test/
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-acmpca/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ coverage
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-acmpca/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ jest.config.js
junit.xml
test/
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-amazonmq/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tsconfig.json
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-amazonmq/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ jest.config.js
junit.xml
test/
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-amplify/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tsconfig.json
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-amplify/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ jest.config.js
junit.xml
test/
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-amplifyuibuilder/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nyc.config.js
!jest.config.js
junit.xml

!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-amplifyuibuilder/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ junit.xml
test/
!*.lit.ts

**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-apigateway/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ nyc.config.js
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-apigateway/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ jest.config.js
junit.xml
test/
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-apigatewayv2-authorizers/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tsconfig.json
!jest.config.js

junit.xml
!**/*.integ.snapshot/**/asset.*/*.js
!**/*.integ.snapshot/**/asset.*/*.d.ts
!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

!**/*.integ.snapshot/**/asset.*/**
!**/*.snapshot/**/asset.*/**
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-apigatewayv2-authorizers/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ jest.config.js
junit.xml
test/
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
**/*.snapshot
Loading