Skip to content

Commit

Permalink
Merge pull request #89408 from gavinfish/delete-cleanup
Browse files Browse the repository at this point in the history
Delete Cleanup method in e2e util
  • Loading branch information
k8s-ci-robot committed Mar 24, 2020
2 parents ebf5679 + 6ea1578 commit bf4cc5b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/e2e/framework/util.go
Expand Up @@ -553,17 +553,6 @@ func RandomSuffix() string {
return strconv.Itoa(rand.Intn(10000))
}

// Cleanup stops everything from filePath from namespace ns and checks if everything matching selectors from the given namespace is correctly stopped.
func Cleanup(filePath, ns string, selectors ...string) {
ginkgo.By("using delete to clean up resources")
var nsArg string
if ns != "" {
nsArg = fmt.Sprintf("--namespace=%s", ns)
}
RunKubectlOrDie(ns, "delete", "--grace-period=0", "-f", filePath, nsArg)
AssertCleanup(ns, selectors...)
}

// AssertCleanup asserts that cleanup of a namespace wrt selectors occurred.
func AssertCleanup(ns string, selectors ...string) {
var nsArg string
Expand Down

0 comments on commit bf4cc5b

Please sign in to comment.