From 3d81b0b2c868fa0a9632250043992f16ea0d7ab9 Mon Sep 17 00:00:00 2001 From: Vallery Lancey Date: Sun, 16 Dec 2018 12:12:29 -0800 Subject: [PATCH 1/3] Moved GCE-specific ingress test yaml to a ./gce directory. (#58640) --- test/e2e/framework/ingress/ingress_utils.go | 3 +++ test/e2e/network/ingress.go | 2 +- .../testing-manifests/ingress/{ => gce}/static-ip-2/ing.yaml | 0 .../testing-manifests/ingress/{ => gce}/static-ip-2/rc.yaml | 0 .../testing-manifests/ingress/{ => gce}/static-ip-2/svc.yaml | 0 test/e2e/upgrades/ingress.go | 3 +-- 6 files changed, 5 insertions(+), 3 deletions(-) rename test/e2e/testing-manifests/ingress/{ => gce}/static-ip-2/ing.yaml (100%) rename test/e2e/testing-manifests/ingress/{ => gce}/static-ip-2/rc.yaml (100%) rename test/e2e/testing-manifests/ingress/{ => gce}/static-ip-2/svc.yaml (100%) diff --git a/test/e2e/framework/ingress/ingress_utils.go b/test/e2e/framework/ingress/ingress_utils.go index 0cb68dc4e9a..aca07541ead 100644 --- a/test/e2e/framework/ingress/ingress_utils.go +++ b/test/e2e/framework/ingress/ingress_utils.go @@ -86,6 +86,9 @@ const ( // IngressManifestPath is the parent path to yaml test manifests. IngressManifestPath = "test/e2e/testing-manifests/ingress" + // GCEIngressManifestPath is the parent path to GCE-specific yaml test manifests. + GCEIngressManifestPath = IngressManifestPath + "/gce" + // IngressReqTimeout is the timeout on a single http request. IngressReqTimeout = 10 * time.Second diff --git a/test/e2e/network/ingress.go b/test/e2e/network/ingress.go index 6a9a98b5485..9918272e763 100644 --- a/test/e2e/network/ingress.go +++ b/test/e2e/network/ingress.go @@ -889,7 +889,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() { It("single and multi-cluster ingresses should be able to exist together", func() { By("Creating a single cluster ingress first") jig.Class = "" - singleIngFilePath := filepath.Join(ingress.IngressManifestPath, "static-ip-2") + singleIngFilePath := filepath.Join(ingress.GCEIngressManifestPath, "static-ip-2") jig.CreateIngress(singleIngFilePath, ns, map[string]string{}, map[string]string{}) jig.WaitForIngress(false /*waitForNodePort*/) // jig.Ingress will be overwritten when we create MCI, so keep a reference. diff --git a/test/e2e/testing-manifests/ingress/static-ip-2/ing.yaml b/test/e2e/testing-manifests/ingress/gce/static-ip-2/ing.yaml similarity index 100% rename from test/e2e/testing-manifests/ingress/static-ip-2/ing.yaml rename to test/e2e/testing-manifests/ingress/gce/static-ip-2/ing.yaml diff --git a/test/e2e/testing-manifests/ingress/static-ip-2/rc.yaml b/test/e2e/testing-manifests/ingress/gce/static-ip-2/rc.yaml similarity index 100% rename from test/e2e/testing-manifests/ingress/static-ip-2/rc.yaml rename to test/e2e/testing-manifests/ingress/gce/static-ip-2/rc.yaml diff --git a/test/e2e/testing-manifests/ingress/static-ip-2/svc.yaml b/test/e2e/testing-manifests/ingress/gce/static-ip-2/svc.yaml similarity index 100% rename from test/e2e/testing-manifests/ingress/static-ip-2/svc.yaml rename to test/e2e/testing-manifests/ingress/gce/static-ip-2/svc.yaml diff --git a/test/e2e/upgrades/ingress.go b/test/e2e/upgrades/ingress.go index fbaacc3b7d3..a3198e1f408 100644 --- a/test/e2e/upgrades/ingress.go +++ b/test/e2e/upgrades/ingress.go @@ -94,10 +94,9 @@ func (t *IngressUpgradeTest) Setup(f *framework.Framework) { // Allocate a static-ip for the Ingress, this IP is cleaned up via CleanupGCEIngressController t.ipName = fmt.Sprintf("%s-static-ip", ns.Name) t.ip = t.gceController.CreateStaticIP(t.ipName) - // Create a working basic Ingress By(fmt.Sprintf("allocated static ip %v: %v through the GCE cloud provider", t.ipName, t.ip)) - jig.CreateIngress(filepath.Join(ingress.IngressManifestPath, "static-ip-2"), ns.Name, map[string]string{ + jig.CreateIngress(filepath.Join(ingress.GCEIngressManifestPath, "static-ip-2"), ns.Name, map[string]string{ ingress.IngressStaticIPKey: t.ipName, ingress.IngressAllowHTTPKey: "false", }, map[string]string{}) From 776ac93f040e2dbca20bfbea9d132fc1f5689a77 Mon Sep 17 00:00:00 2001 From: Vallery Lancey Date: Fri, 1 Mar 2019 10:42:06 -0800 Subject: [PATCH 2/3] Fix mispelled variable in ingress.go after rebase --- test/e2e/upgrades/ingress.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/upgrades/ingress.go b/test/e2e/upgrades/ingress.go index 4c34dd0ff1e..c6d715d4e44 100644 --- a/test/e2e/upgrades/ingress.go +++ b/test/e2e/upgrades/ingress.go @@ -96,7 +96,7 @@ func (t *IngressUpgradeTest) Setup(f *framework.Framework) { t.ipName = fmt.Sprintf("%s-static-ip", ns.Name) t.ip = t.gceController.CreateStaticIP(t.ipName) // Create a working basic Ingress - ginko.By(fmt.Sprintf("allocated static ip %v: %v through the GCE cloud provider", t.ipName, t.ip)) + ginkgo.By(fmt.Sprintf("allocated static ip %v: %v through the GCE cloud provider", t.ipName, t.ip)) jig.CreateIngress(filepath.Join(ingress.GCEIngressManifestPath, "static-ip-2"), ns.Name, map[string]string{ ingress.IngressStaticIPKey: t.ipName, ingress.IngressAllowHTTPKey: "false", From 579764eb3746f8d3028cc4ed0f2085ce437c80e3 Mon Sep 17 00:00:00 2001 From: Vallery Lancey Date: Fri, 1 Mar 2019 11:19:01 -0800 Subject: [PATCH 3/3] Tiny whitespace tweak in ingress.go --- test/e2e/upgrades/ingress.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/upgrades/ingress.go b/test/e2e/upgrades/ingress.go index c6d715d4e44..b4b94ee5df4 100644 --- a/test/e2e/upgrades/ingress.go +++ b/test/e2e/upgrades/ingress.go @@ -95,6 +95,7 @@ func (t *IngressUpgradeTest) Setup(f *framework.Framework) { // Allocate a static-ip for the Ingress, this IP is cleaned up via CleanupGCEIngressController t.ipName = fmt.Sprintf("%s-static-ip", ns.Name) t.ip = t.gceController.CreateStaticIP(t.ipName) + // Create a working basic Ingress ginkgo.By(fmt.Sprintf("allocated static ip %v: %v through the GCE cloud provider", t.ipName, t.ip)) jig.CreateIngress(filepath.Join(ingress.GCEIngressManifestPath, "static-ip-2"), ns.Name, map[string]string{