mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Merge pull request #121139 from bart0sh/PR123-e2e-move-node-rediness-check-to-DeferCleanup
e2e: move AllNodesReady check to DeferCleanup
This commit is contained in:
commit
39d3580d17
@ -30,14 +30,10 @@ import (
|
|||||||
func init() {
|
func init() {
|
||||||
framework.NewFrameworkExtensions = append(framework.NewFrameworkExtensions,
|
framework.NewFrameworkExtensions = append(framework.NewFrameworkExtensions,
|
||||||
func(f *framework.Framework) {
|
func(f *framework.Framework) {
|
||||||
ginkgo.AfterEach(func(ctx context.Context) {
|
ginkgo.BeforeEach(func() {
|
||||||
if f.ClientSet == nil {
|
ginkgo.DeferCleanup(func(ctx context.Context) {
|
||||||
// Test didn't reach f.BeforeEach, most
|
framework.ExpectNoError(e2enode.AllNodesReady(ctx, f.ClientSet, 7*time.Minute))
|
||||||
// likely because the test got
|
})
|
||||||
// skipped. Nothing to check...
|
|
||||||
return
|
|
||||||
}
|
|
||||||
e2enode.AllNodesReady(ctx, f.ClientSet, 7*time.Minute)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user