Skip to content

Commit

Permalink
fix(awscdk): integration tests should deploy ** by default instead of…
Browse files Browse the repository at this point in the history
… * (projen#1524)

Per discussion in projen#1496 (comment), `**` is a better choice for the default integration test stack to deploy, as using `**` targets stacks including those nested in stages.

---
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
misterjoshua authored Jan 13, 2022
1 parent b9771c1 commit 39e3646
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -3917,7 +3917,7 @@ new awscdk.IntegrationTest(project: Project, options: IntegrationTestOptions)
* **entrypoint** (<code>string</code>) A path from the project root directory to a TypeScript file which contains the integration test app.
* **tsconfigPath** (<code>string</code>) The path of the tsconfig.json file to use when running integration test cdk apps.
* **name** (<code>string</code>) Name of the integration test. __*Default*__: Derived from the entrypoint filename.
* **stacks** (<code>Array<string></code>) A list of stacks within the integration test to deploy/destroy. __*Default*__: ["*"]
* **stacks** (<code>Array<string></code>) A list of stacks within the integration test to deploy/destroy. __*Default*__: ["**"]



Expand Down Expand Up @@ -11706,7 +11706,7 @@ Name | Type | Description
**tsconfigPath**🔹 | <code>string</code> | The path of the tsconfig.json file to use when running integration test cdk apps.
**destroyAfterDeploy**?🔹 | <code>boolean</code> | Destroy the test app after a successful deployment.<br/>__*Default*__: true
**name**?🔹 | <code>string</code> | Name of the integration test.<br/>__*Default*__: Derived from the entrypoint filename.
**stacks**?🔹 | <code>Array<string></code> | A list of stacks within the integration test to deploy/destroy.<br/>__*Default*__: ["*"]
**stacks**?🔹 | <code>Array<string></code> | A list of stacks within the integration test to deploy/destroy.<br/>__*Default*__: ["**"]



Expand Down
4 changes: 2 additions & 2 deletions src/awscdk/integration-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface IntegrationTestOptions extends IntegrationTestCommonOptions {

/**
* A list of stacks within the integration test to deploy/destroy.
* @default ["*"]
* @default ["**"]
*/
readonly stacks?: string[];

Expand Down Expand Up @@ -120,7 +120,7 @@ export class IntegrationTest extends Component {
const cdkopts = opts.join(" ");

// Determine which stacks to deploy
const stacks = options.stacks ?? ["*"];
const stacks = options.stacks ?? ["**"];
const stackOpts = stacks.map((stack) => `'${stack}'`).join(" ");

const deployTask = project.addTask(`integ:${name}:deploy`, {
Expand Down
10 changes: 5 additions & 5 deletions test/awscdk/__snapshots__/integration-test.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39e3646

Please sign in to comment.