Only delete created subnet and VPC in postgres test progs#5658
Open
jeremyevans wants to merge 3 commits into
Open
Only delete created subnet and VPC in postgres test progs#5658jeremyevans wants to merge 3 commits into
jeremyevans wants to merge 3 commits into
Conversation
This was missed in the initial conversion pass.
Depending on spec order, not requriing it can result in a spec error.
Previously, this assumed any subnet or GCP VPC in the project was related to the test, which isn't correct if a shared project is used, as it is for local E2E tests. The prog keeps track of the created subnet, so it knows which subnet was created, and can delete that subnet specifically. For GCP VPC, it can know the specific VPC if a VPC is created per subnet. Make that the default behavior, and change the code to look for the specific VPC in that case. Change the progs from calling nap_if_gcp_vpc before nap_if_private_subnet, because when dedicated GCP VPCs are used, the private subnet cannot be deleted until after the GCP VPC is deleted, since the GCP VPC references the private subnet.
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.
Previously, this assumed any subnet or GCP VPC in the project was
related to the test, which isn't correct if a shared project is used, as
it is for local E2E tests. The prog keeps track of the created subnet,
so it knows which subnet was created, and can delete that subnet
specifically. For GCP VPC, it can know the specific VPC if a VPC is
created per subnet. Make that the default behavior, and change the code
to look for the specific VPC in that case.
Change the progs from calling nap_if_gcp_vpc before
nap_if_private_subnet, because when dedicated GCP VPCs are used, the
private subnet cannot be deleted until after the GCP VPC is deleted,
since the GCP VPC references the private subnet.
Make a couple of minor improvements while here.