From 4d72932a9d103e7ded13ce6845d3c9d88b6639f6 Mon Sep 17 00:00:00 2001 From: Rohit Ramkumar Date: Wed, 3 Apr 2019 09:30:10 -0400 Subject: [PATCH] Remove Ingress-GCE test that verifies backend health check is not reconciled. --- test/e2e/network/BUILD | 1 - test/e2e/network/ingress.go | 69 ------------------------------------- 2 files changed, 70 deletions(-) diff --git a/test/e2e/network/BUILD b/test/e2e/network/BUILD index fdba7173ec..4137c71e58 100644 --- a/test/e2e/network/BUILD +++ b/test/e2e/network/BUILD @@ -36,7 +36,6 @@ go_library( "//pkg/controller/endpoint:go_default_library", "//pkg/master/ports:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", "//staging/src/k8s.io/api/networking/v1:go_default_library", "//staging/src/k8s.io/api/rbac/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", diff --git a/test/e2e/network/ingress.go b/test/e2e/network/ingress.go index b102b33aa5..5d08fe87a8 100644 --- a/test/e2e/network/ingress.go +++ b/test/e2e/network/ingress.go @@ -27,7 +27,6 @@ import ( compute "google.golang.org/api/compute/v1" "k8s.io/api/core/v1" - extensions "k8s.io/api/extensions/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -121,74 +120,6 @@ var _ = SIGDescribe("Loadbalancing: L7", func() { } }) - It("should not reconcile manually modified health check for ingress", func() { - By("Creating a basic HTTP ingress and wait for it to come up.") - jig.CreateIngress(filepath.Join(ingress.IngressManifestPath, "http"), ns, nil, nil) - jig.WaitForIngress(true) - - // Get cluster UID. - clusterID, err := gce.GetClusterID(f.ClientSet) - Expect(err).NotTo(HaveOccurred()) - // Get the related nodeports. - nodePorts := jig.GetIngressNodePorts(false) - Expect(len(nodePorts)).ToNot(Equal(0)) - - // Filter health check using cluster UID as the suffix. - By("Retrieving relevant health check resources from GCE.") - gceCloud, err := gce.GetGCECloud() - Expect(err).NotTo(HaveOccurred()) - hcs, err := gceCloud.ListHealthChecks() - Expect(err).NotTo(HaveOccurred()) - var hcToChange *compute.HealthCheck - for _, hc := range hcs { - if strings.HasSuffix(hc.Name, clusterID) { - Expect(hc.HttpHealthCheck).NotTo(BeNil()) - if fmt.Sprintf("%d", hc.HttpHealthCheck.Port) == nodePorts[0] { - hcToChange = hc - break - } - } - } - Expect(hcToChange).NotTo(BeNil()) - - By(fmt.Sprintf("Modifying health check %v without involving ingress.", hcToChange.Name)) - // Change timeout from 60s to 25s. - hcToChange.TimeoutSec = 25 - // Change path from /healthz to /. - hcToChange.HttpHealthCheck.RequestPath = "/" - err = gceCloud.UpdateHealthCheck(hcToChange) - Expect(err).NotTo(HaveOccurred()) - - // Add one more path to ingress to trigger resource syncing. - By("Adding a new path to ingress and wait for it to take effect.") - jig.Update(func(ing *extensions.Ingress) { - ing.Spec.Rules = append(ing.Spec.Rules, extensions.IngressRule{ - Host: "ingress.test.com", - IngressRuleValue: extensions.IngressRuleValue{ - HTTP: &extensions.HTTPIngressRuleValue{ - Paths: []extensions.HTTPIngressPath{ - { - Path: "/test", - // Copy backend from the first rule. - Backend: ing.Spec.Rules[0].HTTP.Paths[0].Backend, - }, - }, - }, - }, - }) - }) - // Wait for change to take effect before checking the health check resource. - jig.WaitForIngress(false) - - // Validate the modified fields on health check are intact. - By("Checking if the modified health check is unchanged.") - hcAfterSync, err := gceCloud.GetHealthCheck(hcToChange.Name) - Expect(err).NotTo(HaveOccurred()) - Expect(hcAfterSync.HttpHealthCheck).ToNot(Equal(nil)) - Expect(hcAfterSync.TimeoutSec).To(Equal(hcToChange.TimeoutSec)) - Expect(hcAfterSync.HttpHealthCheck.RequestPath).To(Equal(hcToChange.HttpHealthCheck.RequestPath)) - }) - It("should create ingress with pre-shared certificate", func() { executePresharedCertTest(f, jig, "") })