Delete image snapshots created for integration tests#682
Merged
Conversation
TheRealFalcon
commented
Nov 23, 2020
|
|
||
| def destroy(self): | ||
| self.cloud_instance.delete_resource_group() | ||
| if self.settings.KEEP_INSTANCE: |
Contributor
Author
There was a problem hiding this comment.
This is actually unrelated to the image snapshot but found while testing Azure.
paride
approved these changes
Nov 24, 2020
Contributor
paride
left a comment
There was a problem hiding this comment.
This LGTM, but I'd mention the Azure drive-by fix in the commit message.
Integration tests have been leaving behind snapshot images, so now we clean them up. Also, in testing, found that in Azure, deleting a resource group will automatically delete the instance, so if KEEP_INSTANCE is True, we no longer delete the resource group.
798c29b to
daf552a
Compare
OddBloke
approved these changes
Nov 25, 2020
Collaborator
OddBloke
left a comment
There was a problem hiding this comment.
This LGTM and I've confirmed it works locally; thanks!
This was referenced May 12, 2023
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed Commit Message
Delete image snapshots created for integration tests
Additional Context
For integration testing, any time we use a PPA, proposed, or deb image as our cloud init source, we create a snapshot of setup instance to be the image source for the test run. I originally left deleting that snapshot image as a todo since we weren't using those methods much. With the upcoming SRU we'll be using them a ton, so I figured it was finally time to add it.
Test Steps
Run cloud-init integration tests with CLOUD_INIT_SOURCE = 'PROPOSED'. When the tests are done running, list the custom images for the particular cloud in use (e.g.,
lxc image listfor lxd) and verify no snapshot image exists for that particular test run.Checklist: