Skip to content

Commit d876de1

Browse files
configure the sweeper to clean up firewall rules that are leftover (#5202) (#3621)
* configure the sweeper to clean up firewall rules that are leftover from k8 stuff * add information on which test is being skipped * Update gcp_sweeper_test.go add explanation for resource prefix Signed-off-by: Modular Magician <[email protected]>
1 parent 1f92a02 commit d876de1

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

.changelog/5202.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/gcp_sweeper_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var testResourcePrefixes = []string{
1717
"df-", // https://github.com/hashicorp/terraform-provider-google/issues/8909
1818
"resourcegroup-", // https://github.com/hashicorp/terraform-provider-google/issues/8924
1919
"cluster-", // https://github.com/hashicorp/terraform-provider-google/issues/8924
20+
"k8s-fw-", // firewall rules are getting created and not cleaned up by k8 resources using this prefix
2021
}
2122

2223
func TestMain(m *testing.M) {

google-beta/resource_google_project_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ func skipIfEnvNotSet(t *testing.T, envs ...string) {
432432

433433
for _, k := range envs {
434434
if os.Getenv(k) == "" {
435+
log.Printf("[DEBUG] Warning - environment variable %s is not set - skipping test %s", k, t.Name())
435436
t.Skipf("Environment variable %s is not set", k)
436437
}
437438
}

0 commit comments

Comments
 (0)