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
Hello maintainers
This is my first PR, so all feedback is welcome. This change adds support for the `--quiet` flag within cdk diff command, for users that would not like the following messages 'Stack <name>' and 'There were no differences' to be silenced for stacks which do not have *any* identified differences. The request was made by @nomike in the #26526, I simply followed the very well detailed description.
The change follows similar structure to existing command and how they are passed, I have also added to the README as per the contributing guidelines.
Before submitting I have.
- Built the packages & linted them
- Ran unit tests for the entire module
- Ran all integration tests in the suite from `@aws-cdk-testing/cli-integ/bin/run-suite -a cli-integ-tests`
- E2E tested by launching my small stack in account and executing diffs on it from my build.
Closes#26526
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts
+12
Original file line number
Diff line number
Diff line change
@@ -651,6 +651,18 @@ integTest('cdk diff --security-only --fail exits when security changes are prese
651
651
awaitexpect(fixture.cdk(['diff','--security-only','--fail',fixture.fullStackName(stackName)])).rejects.toThrow('exited with error');
652
652
}));
653
653
654
+
integTest('cdk diff --quiet does not print \'There were no differences\' message for stacks which have no differences',withDefaultFixture(async(fixture)=>{
The `quiet` flag can also be passed to the `cdk diff` command. Assuming there are no differences detected the output to the console will **not** contain strings such as the *Stack*`MyStackName` and `There were no differences`.
161
+
162
+
```console
163
+
$ # Diff against the currently deployed stack with quiet parameter enabled
0 commit comments