test: add multi- and recursive-relationship E2Es, refactor test utils #2537
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.
Description of changes
This change adds E2Es to follow up on #2533
Additional changes
StackConfig
structure for passing configs like prefix and an option to use the sandboxconfigurable-sandbox-stack
sinceStackConfig
now controls sandbox inconfigurable-stack
postDeployWaitMs
parameter to the CDK deploy script to allow tests to opt-in to a wait period to let resources finalize/propagate. This is a naive attempt to make the CDK-based SQL tests more stable by imitating the wait that we do during SQL database setup to let security group settings change. The justification is that many of the SQL failures I see locally are due toUnable to retrieve secret for database connection from Secrets Manager...
errors. My hypothesis is that the secrets manager VPC service endpoint hasn't fully resolved by the time we start the test, because a subsequent test run in the same project works as expected.references-sqlprimary-sqlrelated.test.ts
that looks like the secrets manager timeout, so I'm not convinced this really fixes things. I'd like to leave it in for now and continue investigating.Checklist
yarn test
passesassoc_field
failed because of a timeout in thecdk destroy
section, but all tests passedreferences-sqlprimary-sqlrelated.test.ts
failed because of the recurring failure when a project is first set up, but passes locallyBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.