chore: fix CLI integration tests#4198
Conversation
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
|
|
||
| assert "cdk_synth ${STACK_NAME_PREFIX}-missing-ssm-parameter -c test:ssm-parameter-name=${parameterName}" <<HERE | ||
| SSM parameter not available in account ${account}, region ${region}: ${parameterName} | ||
| [Error at /cdk-toolkit-integration-missing-ssm-parameter] SSM parameter not available in account 993655754359, region us-east-1: /does/not/exist |
There was a problem hiding this comment.
Are you sure we don’t want to use substitution here?
There was a problem hiding this comment.
+1
does this work:
[Error at ${STACK_NAME_PREFIX}-missing-ssm-parameter] SSM parameter not available in account ${account}, region ${region}: ${parameterName}
or adding errorKey=[Error at /cdk-toolkit-integration-missing-ssm-parameter] and use it as ${errorKey} ahead of the rest of the existing error message?
There was a problem hiding this comment.
Doh, you are correct.
|
|
||
| assert "cdk_synth ${STACK_NAME_PREFIX}-missing-ssm-parameter -c test:ssm-parameter-name=${parameterName}" <<HERE | ||
| SSM parameter not available in account ${account}, region ${region}: ${parameterName} | ||
| [Error at /cdk-toolkit-integration-missing-ssm-parameter] SSM parameter not available in account 993655754359, region us-east-1: /does/not/exist |
There was a problem hiding this comment.
+1
does this work:
[Error at ${STACK_NAME_PREFIX}-missing-ssm-parameter] SSM parameter not available in account ${account}, region ${region}: ${parameterName}
or adding errorKey=[Error at /cdk-toolkit-integration-missing-ssm-parameter] and use it as ${errorKey} ahead of the rest of the existing error message?
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
I'm going to drastically simplify the scripts used here, and remove the references to verdaccio etc. Setting up the runtime environment so that we can choose what artifacts to work from should be the responsibility of the caller, not of the tests themselves. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
140de50 to
4269940
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Fixes:
Refactor:
Simplify testing scripts themselves to run commands as they normally would (just runs
cdk, just callsnpm install @aws-cdk/core), and remove the dependency on a complex set of sourced bash scripts with functions that need to be called at the right moment.Instead, there are three new dispatcher scripts:
Which set up an appropriate environment before calling a command that is passed.
Each of them does something different, but through a combination of
PATHmanipulation, config file rewriting and other things makes it so that in the subsequent script thecdkcommand points to an appropriate instance of the CDK,npm installandpip installwill install packages from an appropriate source, etc.To be used like so:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license