Skip to content

Commit

Permalink
Merge pull request linode#147 from Charliekenney23/fix/dont-use-xfilt…
Browse files Browse the repository at this point in the history
…er-for-lke

dont use xfilter for lke sweeper
  • Loading branch information
0xch4z committed May 5, 2020
2 parents 0ef1a4c + 68c19c8 commit a90e541
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions linode/resource_linode_lke_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@ func testSweepLinodeLKECluster(prefix string) error {
return fmt.Errorf("Error getting client: %s", err)
}

listOpts := sweeperListOptions(prefix, "label")
clusters, err := client.ListLKEClusters(context.Background(), listOpts)
clusters, err := client.ListLKEClusters(context.Background(), nil)
if err != nil {
return fmt.Errorf("Error getting clusters: %s", err)
}
for _, cluster := range clusters {
if !shouldSweepAcceptanceTestResource(prefix, cluster.Label) {
continue
}
if err := client.DeleteInstance(context.Background(), cluster.ID); err != nil {
if err := client.DeleteLKECluster(context.Background(), cluster.ID); err != nil {
return fmt.Errorf("Error destroying LKE cluster %d during sweep: %s", cluster.ID, err)
}
}
Expand Down

0 comments on commit a90e541

Please sign in to comment.