-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tool for cleaning leaked resoures from e2e tests.
* Fix a bug in resource cleanup where tcproutes and meshes were not being cleaned up due to sending invalid URL. * Adjust cleanup matching to clean resources from all tests when RunID is empty.
- Loading branch information
1 parent
8711e4d
commit 8aadc2d
Showing
4 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"flag" | ||
"fmt" | ||
"os" | ||
|
||
"github.com/GoogleCloudPlatform/k8s-cloud-provider/e2e" | ||
_ "k8s.io/klog/v2" | ||
) | ||
|
||
func init() { | ||
flag.Usage = func() { | ||
fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0]) | ||
flag.PrintDefaults() | ||
fmt.Fprint(flag.CommandLine.Output(), "\n\n Example Usage: go run ./cmd/e2e-cleaner/main.go -project my-project -run-id \"\"\n") | ||
} | ||
} | ||
|
||
func main() { | ||
e2e.ParseFlagsOrDie() | ||
ctx := context.Background() | ||
e2e.SetupCloudOrDie(ctx) | ||
e2e.FallbackCleanup(ctx) | ||
} |
This file contains 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
This file contains 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
This file contains 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