You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/cli-integ/README.md
+48-39Lines changed: 48 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,55 +35,39 @@ Each subdirectory contains one test **suite**, and in the development pipeline e
35
35
36
36
Test suites are written as a collection of Jest tests, and they are run using Jest, using the code in the `lib/` directory as helpers.
37
37
38
-
### Setup
38
+
### Components under test
39
39
40
-
Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your environment is built properly by following the steps below:
40
+
The tests have their own version, and can test other components at multiple versions. The following components can be injected,
41
+
and will default to the latest published version if not supplied.
41
42
42
-
```shell
43
-
yarn install # Install dependencies
44
-
npx lerna run build --scope=aws-cdk # Build the CDK cli
45
-
yarn build # Build the @aws-cdk-testing/cli-integ package
46
-
../../../scripts/align-version.sh # Align the versions of CDK packages
47
-
```
43
+
Because many tests are very different, there is no generalized mechanism to
44
+
inject these dependencies into tests. Users can specify component versions, but
45
+
Test Authors are responsible for taking these parameters and using it to set up
46
+
the right environment for the tests.
48
47
49
-
### Running tests with debugger
50
-
51
-
```json
52
-
{
53
-
"version": "0.2.0",
54
-
"configurations": [
55
-
{
56
-
"type": "node",
57
-
"request": "launch",
58
-
"args": ["-a", "cli-integ-tests", "-t", "context in stage propagates to top"],
| CDK Construct Library |`--framework-version=VERSION`| Latest | Nothing |`npm install` into temporary project dir. |
51
+
| CDK CLI |`--cli-version=VERSION`| Auto source |`npm install` into tempdir | Add to `$PATH`. |
52
+
||`--cli-source=ROOT` or `auto`| Auto source || Add `<ROOT>/packages/aws-cdk/bin` to `$PATH`. |
53
+
| Toolkit Library | `--toolkit-lib-version=VERSION` | Devdep | Install into its own deps | Nothing
73
54
74
55
### Running a test suite
75
56
76
57
You run a suite using the `bin/run-suite` tool. You must select either a version of the CLI and framework which can be `npm install`ed, or point to the root of the source tree:
To run a specific test, add `-t` and a substring of the test name. For example:
@@ -94,10 +78,10 @@ bin/run-suite -a cli-integ-tests -t 'load old assemblies'
94
78
95
79
### Running a test suite against binaries
96
80
97
-
Some test suites require package binaries stages in CodeArtifact repositories to run. This requires you to do a full build, then create a CodeArtifact repository in your own account, uploading the packages there, and then running the tests in a shell configured to have NPM, Pip, Maven etc look for those packages in CodeArtifact.
81
+
The test suites that run the "init tests" require actual packages staged in CodeArtifact repositories to run. This requires you to do a full build, then create a CodeArtifact repository in your own account, uploading the packages there, and then running the tests in a shell configured to have NPM, Pip, Maven etc look for those packages in CodeArtifact.
98
82
99
83
```shell
100
-
# Build and pack all of CDK (will take ~an hour)
84
+
# Build and pack all of CDK (in the `aws-cdk` repo, will take ~an hour)
0 commit comments