Skip to content

Commit

Permalink
dont use xfilter for lke sweeper
Browse files Browse the repository at this point in the history
  • Loading branch information
0xch4z committed May 5, 2020
1 parent 0ef1a4c commit 68c19c8
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 68c19c8

Please sign in to comment.