Skip to content

Commit b261fea

Browse files
authored
docs(integ-runner): explain default workflow (#28972)
### Reason for this change The current introduction does not properly explain how it works. ### Description of changes updated readme only ### Description of how you validated changes I have asked for feedback from peers ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 7fd476e commit b261fea

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

packages/@aws-cdk/integ-runner/README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ publishing this tool so that it can be used by the community and we would love t
2424
on use cases that the tool should support, or issues that prevent the tool from being used in your
2525
library.
2626

27-
This tool is meant to be used with the [integ-tests](https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/integ-tests-alpha) library.
27+
This tool is meant to be used with the [integ-tests](https://docs.aws.amazon.com/cdk/api/v2/docs/integ-tests-alpha-readme.html) library.
2828

2929
## Usage
3030

@@ -34,17 +34,24 @@ This tool is meant to be used with the [integ-tests](https://github.com/aws/aws-
3434
integ-runner [ARGS] [TEST...]
3535
```
3636

37-
This will look for all files that match the naming convention of `/integ.*.js$/`. Each of these files will be expected
38-
to be a self contained CDK app. The runner will execute the following for each file (app):
37+
This will look for all files that match the naming convention of `/integ.*.(js|ts)$/` or `/integ_*.py`.
38+
Each of these files represents a self contained AWS CDK app, defining test cases and assertions using the [integ-tests](https://docs.aws.amazon.com/cdk/api/v2/docs/integ-tests-alpha-readme.html) library.
3939

40-
1. Check if snapshot files exist (i.e. `*.snapshot/**`)
41-
2. If the snapshot does not exist\
42-
a) Synth the integ app which will produce the `integ.json` file
43-
3. Read the `integ.json` file which contains instructions on what the runner should do.
44-
4. Execute instructions
40+
By default, executing `integ-runner` will do the following for each file (app):
41+
42+
1. Synth each integration test to create a new snapshot in memory
43+
2. Compare the snapshot to the previous version (i.e. files in `*.snapshot/**`), and fail on any differences.\
44+
For new tests this will always fail.
45+
46+
To accept a snapshot update, the integreation test has to be deployed and assertions have to pass.\
47+
Execute the runner again, this time with `integ-runner --update-on-fail` and the following will happen for each file:
48+
49+
1. Deploy the previous snapshot
50+
2. Deploy the new version as a Stack update and run assertions
51+
3. If successful, update the snapshots
4552

4653
All snapshot files (i.e. `*.snapshot/**`) must be checked-in to version control.
47-
If not, changes cannot be compared across systems.
54+
If not, changes cannot be compared across systems and the [update workflow](#update-workflow) cannot be used.
4855

4956
### Options
5057

0 commit comments

Comments
 (0)