-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(cli): regression tests #7060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
ae423e3
added regression tests ability
iliapolo bd30a4d
revert changes to test-cdk-assembly.sh
iliapolo 945121c
remove version patching - not needed anymore
iliapolo 29d05c6
remove blank line
iliapolo 190793f
fix npm local wrapper to support using latest published framework
iliapolo 23dfb21
cleanup
iliapolo 7438634
only publish CDK cli when using published framework
iliapolo 9a93910
sanity check
iliapolo 7b093b9
dummy
iliapolo 6cac037
dummy
iliapolo ed7cc03
added some logs
iliapolo 0aa39c8
fix tarball path
iliapolo 434c2b5
oh my
iliapolo f112b71
fix version
iliapolo a22c215
fix tarball construction
iliapolo 91536df
perpand parameters value with stack prefix
iliapolo 9d795e7
only publish CDK cli when using published framework
iliapolo 4632a28
Merge branch 'epolon-cli-regression-tests' into epolon/cli-regression…
iliapolo 9d2840b
remove .history from ignore
iliapolo 5292fa4
remove blank line
iliapolo 229f3e5
uncomment test
iliapolo bc875e3
tidy up
iliapolo 79e6e12
remove debug logs
iliapolo 1588905
some logs
iliapolo 2c681e9
added regression tests work directories to ignore
iliapolo 9c63076
added regression tests instructions in CLI contrib guide
iliapolo 60f816b
added comments about why STACK_NAME_PREFIX is needed in the SNS topic…
iliapolo 0011205
rename some scripts and more detailed explanation in contrib guide
iliapolo 2f7394c
fix path to scripts
iliapolo a6d07fe
some rephrasing
iliapolo bda1dba
typos
iliapolo 226b95f
typo
iliapolo 714bd0e
quote env variable expansion in if statement
iliapolo 786f61a
added bunch of comments around the code
iliapolo 896c866
more comments
iliapolo b0facdc
Merge branch 'master' into epolon/cli-regression-tests
iliapolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Run only local integration tests. | ||
| # | ||
| set -eu | ||
|
|
||
| scriptdir=$(cd $(dirname $0) && pwd) | ||
|
|
||
| echo "Running local integration tests" | ||
| ./test/integ/run-against-repo test/integ/cli/test.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Run only local integration tests. | ||
| # | ||
| set -eu | ||
|
|
||
| scriptdir=$(cd $(dirname $0) && pwd) | ||
| repo_root=$(realpath ${scriptdir}/..) | ||
|
|
||
| echo "Running regression tests against local code" | ||
| ${repo_root}/test/integ/run-against-repo ${repo_root}/test/integ/test-cli-regression-against-current-code.sh | ||
|
|
||
| echo "Running regression tests against local CLI and published framework" | ||
| ${repo_root}/test/integ/run-against-repo ${repo_root}/test/integ/test-cli-regression-against-latest-release.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Run both local integration tests and regression tests. | ||
| # | ||
| set -eu | ||
|
|
||
| scriptdir=$(cd $(dirname $0) && pwd) | ||
|
|
||
| ${scriptdir}/integ-cli-no-regression.sh | ||
| ${scriptdir}/integ-cli-regression.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| /** | ||
iliapolo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| List of exclusions when running backwards compatibility tests. | ||
| Add when you need to exclude a specific integration test from a specific version. | ||
|
|
||
| This is an escape hatch for the rare cases where we need to introduce | ||
| a change that breaks existing integration tests. (e.g security) | ||
|
|
||
| For example: | ||
|
|
||
| { | ||
| "test": "test-cdk-iam-diff.sh", | ||
| "version": "1.30.0", | ||
| "justification": "iam policy generation has changed in version > 1.30.0 because..." | ||
| }, | ||
|
|
||
| */ | ||
| const exclusions = [] | ||
|
|
||
| function getExclusion(test, version) { | ||
|
|
||
| const filtered = exclusions.filter(e => { | ||
| return e.test === test && e.version === version; | ||
| }); | ||
|
|
||
| if (filtered.length === 0) { | ||
| return undefined; | ||
| } | ||
|
|
||
| if (filtered.length === 1) { | ||
| return filtered[0]; | ||
| } | ||
|
|
||
| throw new Error(`Multiple exclusions found for (${test, version}): ${filtered.length}`); | ||
|
|
||
| } | ||
|
|
||
| module.exports.shouldSkip = function (test, version) { | ||
|
|
||
| const exclusion = getExclusion(test, version); | ||
|
|
||
| return exclusion != undefined | ||
|
|
||
| } | ||
|
|
||
| module.exports.getJustification = function (test, version) { | ||
|
|
||
| const exclusion = getExclusion(test, version); | ||
|
|
||
| if (!exclusion) { | ||
| throw new Error(`Exclusion not found for (${test}, ${version})`); | ||
| } | ||
|
|
||
| return exclusion.justification; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.