@@ -27,7 +27,6 @@ import (
27
27
compute "google.golang.org/api/compute/v1"
28
28
29
29
"k8s.io/api/core/v1"
30
- extensions "k8s.io/api/extensions/v1beta1"
31
30
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
32
31
"k8s.io/apimachinery/pkg/api/errors"
33
32
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -121,74 +120,6 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
121
120
}
122
121
})
123
122
124
- It ("should not reconcile manually modified health check for ingress" , func () {
125
- By ("Creating a basic HTTP ingress and wait for it to come up." )
126
- jig .CreateIngress (filepath .Join (ingress .IngressManifestPath , "http" ), ns , nil , nil )
127
- jig .WaitForIngress (true )
128
-
129
- // Get cluster UID.
130
- clusterID , err := gce .GetClusterID (f .ClientSet )
131
- Expect (err ).NotTo (HaveOccurred ())
132
- // Get the related nodeports.
133
- nodePorts := jig .GetIngressNodePorts (false )
134
- Expect (len (nodePorts )).ToNot (Equal (0 ))
135
-
136
- // Filter health check using cluster UID as the suffix.
137
- By ("Retrieving relevant health check resources from GCE." )
138
- gceCloud , err := gce .GetGCECloud ()
139
- Expect (err ).NotTo (HaveOccurred ())
140
- hcs , err := gceCloud .ListHealthChecks ()
141
- Expect (err ).NotTo (HaveOccurred ())
142
- var hcToChange * compute.HealthCheck
143
- for _ , hc := range hcs {
144
- if strings .HasSuffix (hc .Name , clusterID ) {
145
- Expect (hc .HttpHealthCheck ).NotTo (BeNil ())
146
- if fmt .Sprintf ("%d" , hc .HttpHealthCheck .Port ) == nodePorts [0 ] {
147
- hcToChange = hc
148
- break
149
- }
150
- }
151
- }
152
- Expect (hcToChange ).NotTo (BeNil ())
153
-
154
- By (fmt .Sprintf ("Modifying health check %v without involving ingress." , hcToChange .Name ))
155
- // Change timeout from 60s to 25s.
156
- hcToChange .TimeoutSec = 25
157
- // Change path from /healthz to /.
158
- hcToChange .HttpHealthCheck .RequestPath = "/"
159
- err = gceCloud .UpdateHealthCheck (hcToChange )
160
- Expect (err ).NotTo (HaveOccurred ())
161
-
162
- // Add one more path to ingress to trigger resource syncing.
163
- By ("Adding a new path to ingress and wait for it to take effect." )
164
- jig .Update (func (ing * extensions.Ingress ) {
165
- ing .Spec .Rules = append (ing .Spec .Rules , extensions.IngressRule {
166
- Host : "ingress.test.com" ,
167
- IngressRuleValue : extensions.IngressRuleValue {
168
- HTTP : & extensions.HTTPIngressRuleValue {
169
- Paths : []extensions.HTTPIngressPath {
170
- {
171
- Path : "/test" ,
172
- // Copy backend from the first rule.
173
- Backend : ing .Spec .Rules [0 ].HTTP .Paths [0 ].Backend ,
174
- },
175
- },
176
- },
177
- },
178
- })
179
- })
180
- // Wait for change to take effect before checking the health check resource.
181
- jig .WaitForIngress (false )
182
-
183
- // Validate the modified fields on health check are intact.
184
- By ("Checking if the modified health check is unchanged." )
185
- hcAfterSync , err := gceCloud .GetHealthCheck (hcToChange .Name )
186
- Expect (err ).NotTo (HaveOccurred ())
187
- Expect (hcAfterSync .HttpHealthCheck ).ToNot (Equal (nil ))
188
- Expect (hcAfterSync .TimeoutSec ).To (Equal (hcToChange .TimeoutSec ))
189
- Expect (hcAfterSync .HttpHealthCheck .RequestPath ).To (Equal (hcToChange .HttpHealthCheck .RequestPath ))
190
- })
191
-
192
123
It ("should create ingress with pre-shared certificate" , func () {
193
124
executePresharedCertTest (f , jig , "" )
194
125
})
0 commit comments