Introduce test isolation and fix missing GCS service account #2935
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.
Fix tests:
By adding
google_storage_project_service_account
andgoogle_bigquery_default_service_account
to setup_module for E2E tests. This should fix the issue with missing service accounts reported by some of the tests:Fix tests using Private Service Access with
ABANDON
policy, by adding a new tag to tests:isolated
.Isolated tests do not reuse test project, but instead they always get a fresh one, and it is discarded after the test is run. As
ABANDON
policy to remove results in project in a different state than starting one, this solves the issue we saw with some tests recently.Tests where looking flaky, as which test failed was depending on execution order and allocation to threads, and the more the threads, the lesser risk that one of the tests fails.
Failure message for PSA was:
Checklist
I applicable, I acknowledge that I have:
terraform fmt
on all modified filestools/tfdoc.py