Skip to content

Commit

Permalink
chore: add new style integration test snapshots (#19802)
Browse files Browse the repository at this point in the history
The bulk of this PR is adding the new style integration test snapshots
that the new `integ-runner` uses. These are snapshots of the cloud
assembly and have folder names like `${testName}.integ.snapshot`.

Some other minor updates were made as part of this change.

1. Updated `integ-runner` to use `synthFast` instead of `synth` to speed
   up performance.
2. Make sure the `integ-runner` throws an exit code if any tests fail
3. Updated the test names to include the directory if running from a
   parent directory (i.e. `packages/@aws-cdk`).
4. Added the ability to exempt from the update workflow (update workflow
   is not yet implemented). If a test is exempt then the snapshot will
   not contain any assets. For now this is used for tests that include
   very large assets that would drastically increase the size of the
   repo.
5. Updated some custom resources to exclude `*.ts` files from the asset
   bundle. `.ts` files are already excluded when we publish (`.d.ts`
   files are not), and `.js` files are the only thing needed by the
   Lambda function anyway. This was causing issues when running a build
   because those files in the snapshot would cause `tsc` to fail.
    - Updated:
    `aws-events-targets/lib/aws-api.ts`
    `aws-redshift/lib/private/database-query.ts`
    `aws-stepfunctions-tasks/lib/evaluate-expression.ts`
    `custom-resources/lib/aws-custom-resource/aws-custom-resource.ts`
    `custom-resources/lib/provider-framework/provider.ts`


----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [x] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
corymhall authored Apr 8, 2022
1 parent 8ea0a1d commit c0a6e08
Show file tree
Hide file tree
Showing 3,033 changed files with 771,008 additions and 603 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 5 additions & 1 deletion packages/@aws-cdk/alexa-ask/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ tsconfig.json
!.eslintrc.js
!jest.config.js

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

!**/*.integ.snapshot/**/asset.*/**
4 changes: 3 additions & 1 deletion packages/@aws-cdk/alexa-ask/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ jest.config.js
**/cdk.out
junit.xml
test/
!*.lit.ts
!*.lit.ts
**/*.integ.snapshot
**/*.integ.snapshot
6 changes: 5 additions & 1 deletion packages/@aws-cdk/app-delivery/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ coverage
!.eslintrc.js

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

!**/*.integ.snapshot/**/asset.*/**
4 changes: 3 additions & 1 deletion packages/@aws-cdk/app-delivery/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ tsconfig.json
junit.xml
test/
!*.lit.ts
jest.config.js
jest.config.js
**/*.integ.snapshot
**/*.integ.snapshot
Loading

0 comments on commit c0a6e08

Please sign in to comment.