chore(cli): fix nested stack integ test collision #7846
Merged
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.
Commit Message
chore(cli): fix nested stack integ test collision (#7846)
The
StackWithNestedStackUsingParametersin our integ test was for some reason passing a hardcoded parameter value to the nested stack instead of using the parameter value from the parent stack. In addition to not actually testing that parameters are passable between the parent and the child, it caused a collision with parallel tests because the topic name is provided was not unique.This PR simply passes the parent stack parameter to the nested stack, the value of the parent stack param is already unique because it prepends the stack prefix.
In addition, many tests were using parameters like so:
instead of:
The
topicNameproperty expects astring, not aCfnParameter. Since our tests are injavascript, it "compiled". But migrating this totypescriptwould actually result in a proper compilation error.Strangely enough, both of these synthesize to the same thing:
This is because
CfnParameterresolves to itsvaluegetter:End Commit Message
Regarding the
valueAsStringquirk, I changed it since i think the original commit was just an oversight that happened to work. Our docs all refer to usingvalueAsmethods when defining parameters.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license