Commit b7e37d21 authored by Zihong Zheng's avatar Zihong Zheng

[e2e ingress-gce] Plumb the Logger interface and avoid assertion in util functions

parent 4edb82f0
...@@ -16,6 +16,7 @@ go_library( ...@@ -16,6 +16,7 @@ go_library(
"firewall.go", "firewall.go",
"framework.go", "framework.go",
"ingress.go", "ingress.go",
"ingress_scale.go",
"kube_proxy.go", "kube_proxy.go",
"network_policy.go", "network_policy.go",
"network_tiers.go", "network_tiers.go",
...@@ -40,6 +41,7 @@ go_library( ...@@ -40,6 +41,7 @@ go_library(
"//pkg/master/ports:go_default_library", "//pkg/master/ports:go_default_library",
"//test/e2e/framework:go_default_library", "//test/e2e/framework:go_default_library",
"//test/e2e/manifest:go_default_library", "//test/e2e/manifest:go_default_library",
"//test/e2e/network/scale:go_default_library",
"//test/images/net/nat:go_default_library", "//test/images/net/nat:go_default_library",
"//test/utils:go_default_library", "//test/utils:go_default_library",
"//test/utils/image:go_default_library", "//test/utils/image:go_default_library",
...@@ -80,6 +82,9 @@ filegroup( ...@@ -80,6 +82,9 @@ filegroup(
filegroup( filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [
":package-srcs",
"//test/e2e/network/scale:all-srcs",
],
tags = ["automanaged"], tags = ["automanaged"],
) )
...@@ -90,7 +90,8 @@ var _ = SIGDescribe("Loadbalancing: L7", func() { ...@@ -90,7 +90,8 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
Client: jig.Client, Client: jig.Client,
Cloud: framework.TestContext.CloudConfig, Cloud: framework.TestContext.CloudConfig,
} }
gceController.Init() err := gceController.Init()
Expect(err).NotTo(HaveOccurred())
}) })
// Platform specific cleanup // Platform specific cleanup
...@@ -106,7 +107,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() { ...@@ -106,7 +107,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
jig.TryDeleteIngress() jig.TryDeleteIngress()
By("Cleaning up cloud resources") By("Cleaning up cloud resources")
framework.CleanupGCEIngressController(gceController) Expect(gceController.CleanupGCEIngressController()).NotTo(HaveOccurred())
}) })
It("should conform to Ingress spec", func() { It("should conform to Ingress spec", func() {
...@@ -356,7 +357,8 @@ var _ = SIGDescribe("Loadbalancing: L7", func() { ...@@ -356,7 +357,8 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
}, map[string]string{}) }, map[string]string{})
By("Test that ingress works with the pre-shared certificate") By("Test that ingress works with the pre-shared certificate")
jig.WaitForIngressWithCert(true, []string{testHostname}, cert) err = jig.WaitForIngressWithCert(true, []string{testHostname}, cert)
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Unexpected error while waiting for ingress: %v", err))
}) })
It("multicluster ingress should get instance group annotation", func() { It("multicluster ingress should get instance group annotation", func() {
...@@ -398,7 +400,8 @@ var _ = SIGDescribe("Loadbalancing: L7", func() { ...@@ -398,7 +400,8 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
Client: jig.Client, Client: jig.Client,
Cloud: framework.TestContext.CloudConfig, Cloud: framework.TestContext.CloudConfig,
} }
gceController.Init() err := gceController.Init()
Expect(err).NotTo(HaveOccurred())
}) })
// Platform specific cleanup // Platform specific cleanup
...@@ -414,7 +417,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() { ...@@ -414,7 +417,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
jig.TryDeleteIngress() jig.TryDeleteIngress()
By("Cleaning up cloud resources") By("Cleaning up cloud resources")
framework.CleanupGCEIngressController(gceController) Expect(gceController.CleanupGCEIngressController()).NotTo(HaveOccurred())
}) })
It("should conform to Ingress spec", func() { It("should conform to Ingress spec", func() {
......
...@@ -81,7 +81,7 @@ func (t *IngressUpgradeTest) Setup(f *framework.Framework) { ...@@ -81,7 +81,7 @@ func (t *IngressUpgradeTest) Setup(f *framework.Framework) {
Client: jig.Client, Client: jig.Client,
Cloud: framework.TestContext.CloudConfig, Cloud: framework.TestContext.CloudConfig,
} }
gceController.Init() framework.ExpectNoError(gceController.Init())
t.gceController = gceController t.gceController = gceController
t.jig = jig t.jig = jig
...@@ -142,7 +142,7 @@ func (t *IngressUpgradeTest) Teardown(f *framework.Framework) { ...@@ -142,7 +142,7 @@ func (t *IngressUpgradeTest) Teardown(f *framework.Framework) {
} }
By("Cleaning up cloud resources") By("Cleaning up cloud resources")
framework.CleanupGCEIngressController(t.gceController) framework.ExpectNoError(t.gceController.CleanupGCEIngressController())
} }
func (t *IngressUpgradeTest) verify(f *framework.Framework, done <-chan struct{}, testDuringDisruption bool) { func (t *IngressUpgradeTest) verify(f *framework.Framework, done <-chan struct{}, testDuringDisruption bool) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment