Skip to content

Commit

Permalink
Do not return container cluster sweeper errors (#3314) (#5995)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 27, 2020
1 parent a0b1337 commit 25522e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/3314.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
6 changes: 4 additions & 2 deletions google/resource_container_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func testSweepContainerClusters(region string) error {
// List clusters for all zones by using "-" as the zone name
found, err := config.clientContainer.Projects.Zones.Clusters.List(config.Project, "-").Do()
if err != nil {
log.Fatalf("error listing container clusters: %s", err)
log.Printf("error listing container clusters: %s", err)
return nil
}

if len(found.Clusters) == 0 {
Expand All @@ -50,7 +51,8 @@ func testSweepContainerClusters(region string) error {
_, err := config.clientContainer.Projects.Locations.Clusters.Delete(clusterURL).Do()

if err != nil {
return fmt.Errorf("Error, failed to delete cluster %s: %s", cluster.Name, err)
log.Printf("Error, failed to delete cluster %s: %s", cluster.Name, err)
return nil
}
}
}
Expand Down

0 comments on commit 25522e0

Please sign in to comment.