本文整理汇总了Golang中k8s/io/kubernetes/test/e2e/framework.Framework.AfterEach方法的典型用法代码示例。如果您正苦于以下问题:Golang Framework.AfterEach方法的具体用法?Golang Framework.AfterEach怎么用?Golang Framework.AfterEach使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类k8s/io/kubernetes/test/e2e/framework.Framework
的用法示例。
在下文中一共展示了Framework.AfterEach方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
pollErr := wait.Poll(5*time.Second, lbCleanupTimeout, func() (bool, error) {
if err := ingController.Cleanup(false); err != nil {
framework.Logf("Still waiting for glbc to cleanup: %v", err)
return false, nil
}
return true, nil
})
// If the controller failed to cleanup the test will fail, but we want to cleanup
// resources before that.
if pollErr != nil {
if cleanupErr := ingController.Cleanup(true); cleanupErr != nil {
framework.Logf("WARNING: Failed to cleanup resources %v", cleanupErr)
}
framework.Failf("Failed to cleanup GCE L7 resources.")
}
f.AfterEach()
framework.Logf("Successfully verified GCE L7 loadbalancer via Ingress.")
})
It("should create GCE L7 loadbalancers and verify Ingress", func() {
// Create numApps apps, exposed via numIng Ingress each with 2 paths.
// Eg with numApp=10, numIng=5:
// apps: {foo-app-(0-10)}
// ingress: {foo-app-(0, 2, 4, 6, 8)}
// paths:
// ingress foo-app-0:
// default1.bar.com
// foo0.bar.com: /foo0
// foo1.bar.com: /foo1
if numApps < numIng {
framework.Failf("Need more apps than Ingress")