本文整理汇总了Golang中k8s/io/kubernetes/test/e2e/framework.Framework.BeforeEach方法的典型用法代码示例。如果您正苦于以下问题:Golang Framework.BeforeEach方法的具体用法?Golang Framework.BeforeEach怎么用?Golang Framework.BeforeEach使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类k8s/io/kubernetes/test/e2e/framework.Framework
的用法示例。
在下文中一共展示了Framework.BeforeEach方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
//
// Slow by design (10 min)
var _ = framework.KubeDescribe("GCE L7 LoadBalancer Controller [Feature:Ingress]", func() {
// These variables are initialized after framework's beforeEach.
var ns string
var addonDir string
var client *client.Client
var responseTimes, creationTimes []time.Duration
var ingController *IngressController
f := framework.Framework{BaseName: "glbc"}
BeforeEach(func() {
// This test requires a GCE/GKE only cluster-addon
framework.SkipUnlessProviderIs("gce", "gke")
f.BeforeEach()
client = f.Client
ns = f.Namespace.Name
addonDir = filepath.Join(
framework.TestContext.RepoRoot, "cluster", "addons", "cluster-loadbalancing", "glbc")
ingController = &IngressController{
ns: ns,
Project: framework.TestContext.CloudConfig.ProjectID,
c: client,
}
ingController.init()
// If we somehow get the same namespace uid as someone else in this
// gce project, just back off.
Expect(ingController.Cleanup(false)).NotTo(HaveOccurred())
responseTimes = []time.Duration{}
creationTimes = []time.Duration{}