Stop making a new S3 bucket for every integration tests run #127
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.
What does this PR do?
Updates the integration tests to use a single shared S3 bucket for deployment rather than creating a new one every time.
Motivation
Sometimes, the CloudFormation stack created by integration tests might not be deleted at the end of the test run (e.g. if the tests are cancelled). When this happens, we cannot easily remove the CloudFormation stack after the test run, because the stack contains an S3 bucket that contains an Object. We have to empty the S3 bucket before we can manually delete the stack.
By having one shared bucket for all integration test runs, we no longer have to worry about this issue when removing the stack. This bucket also has a lifecycle policy set that will remove objects after one day, so they will never accumulate if they are left behind.
Testing Guidelines
I ran the integration tests.
Additional Notes
It is still possible that we might end up with extraneous CloudFormation stacks, but they will be easier to remove and we can deal with that issue later if it becomes a problem.
Types of Changes
Check all that apply