@@ -164,37 +164,53 @@ var _ = SIGDescribe("Networking", func() {
164
164
ginkgo .It ("should function for pod-Service: http" , func () {
165
165
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
166
166
ginkgo .By (fmt .Sprintf ("dialing(http) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterHTTPPort ))
167
- config .DialFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
168
-
167
+ err := config .DialFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
168
+ if err != nil {
169
+ framework .Failf ("failed dialing endpoint, %v" , err )
170
+ }
169
171
ginkgo .By (fmt .Sprintf ("dialing(http) %v --> %v:%v (nodeIP)" , config .TestContainerPod .Name , config .NodeIP , config .NodeHTTPPort ))
170
- config .DialFromTestContainer ("http" , config .NodeIP , config .NodeHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
172
+
173
+ err = config .DialFromTestContainer ("http" , config .NodeIP , config .NodeHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
174
+ if err != nil {
175
+ framework .Failf ("failed dialing endpoint, %v" , err )
176
+ }
171
177
})
172
178
173
179
ginkgo .It ("should function for pod-Service: udp" , func () {
174
180
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
175
181
ginkgo .By (fmt .Sprintf ("dialing(udp) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterUDPPort ))
176
- config .DialFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
182
+ err := config .DialFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
183
+ if err != nil {
184
+ framework .Failf ("failed dialing endpoint, %v" , err )
185
+ }
177
186
178
187
ginkgo .By (fmt .Sprintf ("dialing(udp) %v --> %v:%v (nodeIP)" , config .TestContainerPod .Name , config .NodeIP , config .NodeUDPPort ))
179
- config .DialFromTestContainer ("udp" , config .NodeIP , config .NodeUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
188
+ err = config .DialFromTestContainer ("udp" , config .NodeIP , config .NodeUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
189
+ if err != nil {
190
+ framework .Failf ("failed dialing endpoint, %v" , err )
191
+ }
180
192
})
181
193
182
194
// Once basic tests checking for the sctp module not to be loaded are implemented, this
183
195
// needs to be marked as [Disruptive]
184
196
ginkgo .It ("should function for pod-Service: sctp [Feature:SCTPConnectivity][Disruptive]" , func () {
185
197
config := e2enetwork .NewNetworkingTestConfig (f , false , true )
186
198
ginkgo .By (fmt .Sprintf ("dialing(sctp) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterSCTPPort ))
187
- config .DialFromTestContainer ("sctp" , config .ClusterIP , e2enetwork .ClusterSCTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
188
-
199
+ err := config .DialFromTestContainer ("sctp" , config .ClusterIP , e2enetwork .ClusterSCTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
200
+ if err != nil {
201
+ framework .Failf ("failed dialing endpoint, %v" , err )
202
+ }
189
203
ginkgo .By (fmt .Sprintf ("dialing(sctp) %v --> %v:%v (nodeIP)" , config .TestContainerPod .Name , config .NodeIP , config .NodeSCTPPort ))
190
- config .DialFromTestContainer ("sctp" , config .NodeIP , config .NodeSCTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
204
+ err = config .DialFromTestContainer ("sctp" , config .NodeIP , config .NodeSCTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
205
+ if err != nil {
206
+ framework .Failf ("failed dialing endpoint, %v" , err )
207
+ }
191
208
})
192
209
193
210
ginkgo .It ("should function for node-Service: http" , func () {
194
211
config := e2enetwork .NewNetworkingTestConfig (f , true , false )
195
212
ginkgo .By (fmt .Sprintf ("dialing(http) %v (node) --> %v:%v (config.clusterIP)" , config .NodeIP , config .ClusterIP , e2enetwork .ClusterHTTPPort ))
196
213
config .DialFromNode ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
197
-
198
214
ginkgo .By (fmt .Sprintf ("dialing(http) %v (node) --> %v:%v (nodeIP)" , config .NodeIP , config .NodeIP , config .NodeHTTPPort ))
199
215
config .DialFromNode ("http" , config .NodeIP , config .NodeHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
200
216
})
@@ -211,19 +227,30 @@ var _ = SIGDescribe("Networking", func() {
211
227
ginkgo .It ("should function for endpoint-Service: http" , func () {
212
228
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
213
229
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (config.clusterIP)" , config .EndpointPods [0 ].Name , config .ClusterIP , e2enetwork .ClusterHTTPPort ))
214
- config .DialFromEndpointContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
215
-
230
+ err := config .DialFromEndpointContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
231
+ if err != nil {
232
+ framework .Failf ("failed dialing endpoint, %v" , err )
233
+ }
216
234
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (nodeIP)" , config .EndpointPods [0 ].Name , config .NodeIP , config .NodeHTTPPort ))
217
- config .DialFromEndpointContainer ("http" , config .NodeIP , config .NodeHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
235
+ err = config .DialFromEndpointContainer ("http" , config .NodeIP , config .NodeHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
236
+ if err != nil {
237
+ framework .Failf ("failed dialing endpoint, %v" , err )
238
+ }
218
239
})
219
240
220
241
ginkgo .It ("should function for endpoint-Service: udp" , func () {
221
242
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
222
243
ginkgo .By (fmt .Sprintf ("dialing(udp) %v (endpoint) --> %v:%v (config.clusterIP)" , config .EndpointPods [0 ].Name , config .ClusterIP , e2enetwork .ClusterUDPPort ))
223
- config .DialFromEndpointContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
244
+ err := config .DialFromEndpointContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
245
+ if err != nil {
246
+ framework .Failf ("failed dialing endpoint, %v" , err )
247
+ }
224
248
225
249
ginkgo .By (fmt .Sprintf ("dialing(udp) %v (endpoint) --> %v:%v (nodeIP)" , config .EndpointPods [0 ].Name , config .NodeIP , config .NodeUDPPort ))
226
- config .DialFromEndpointContainer ("udp" , config .NodeIP , config .NodeUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
250
+ err = config .DialFromEndpointContainer ("udp" , config .NodeIP , config .NodeUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
251
+ if err != nil {
252
+ framework .Failf ("failed dialing endpoint, %v" , err )
253
+ }
227
254
})
228
255
229
256
// This test ensures that in a situation where multiple services exist with the same selector,
@@ -235,49 +262,74 @@ var _ = SIGDescribe("Networking", func() {
235
262
236
263
// original service should work
237
264
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (config.clusterIP)" , config .EndpointPods [0 ].Name , config .ClusterIP , e2enetwork .ClusterHTTPPort ))
238
- config .DialFromEndpointContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
239
-
265
+ err := config .DialFromEndpointContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
266
+ if err != nil {
267
+ framework .Failf ("failed dialing endpoint, %v" , err )
268
+ }
240
269
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (nodeIP)" , config .EndpointPods [0 ].Name , config .NodeIP , config .NodeHTTPPort ))
241
- config .DialFromEndpointContainer ("http" , config .NodeIP , config .NodeHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
242
-
270
+ err = config .DialFromEndpointContainer ("http" , config .NodeIP , config .NodeHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
271
+ if err != nil {
272
+ framework .Failf ("failed dialing endpoint, %v" , err )
273
+ }
243
274
// Dial second service
244
275
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (svc2.clusterIP)" , config .EndpointPods [0 ].Name , svc2 .Spec .ClusterIP , e2enetwork .ClusterHTTPPort ))
245
- config .DialFromEndpointContainer ("http" , svc2 .Spec .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
276
+ err = config .DialFromEndpointContainer ("http" , svc2 .Spec .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
277
+ if err != nil {
278
+ framework .Failf ("failed dialing endpoint, %v" , err )
279
+ }
246
280
247
281
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (nodeIP)" , config .EndpointPods [0 ].Name , config .NodeIP , httpPort ))
248
- config .DialFromEndpointContainer ("http" , config .NodeIP , httpPort , config .MaxTries , 0 , config .EndpointHostnames ())
282
+ err = config .DialFromEndpointContainer ("http" , config .NodeIP , httpPort , config .MaxTries , 0 , config .EndpointHostnames ())
283
+ if err != nil {
284
+ framework .Failf ("failed dialing endpoint, %v" , err )
285
+ }
249
286
250
287
ginkgo .By ("deleting the original node port service" )
251
288
config .DeleteNodePortService ()
252
289
253
290
// Second service should continue to function unaffected
254
291
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (svc2.clusterIP)" , config .EndpointPods [0 ].Name , svc2 .Spec .ClusterIP , e2enetwork .ClusterHTTPPort ))
255
- config .DialFromEndpointContainer ("http" , svc2 .Spec .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
256
-
292
+ err = config .DialFromEndpointContainer ("http" , svc2 .Spec .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
293
+ if err != nil {
294
+ framework .Failf ("failed dialing endpoint, %v" , err )
295
+ }
257
296
ginkgo .By (fmt .Sprintf ("dialing(http) %v (endpoint) --> %v:%v (nodeIP)" , config .EndpointPods [0 ].Name , config .NodeIP , httpPort ))
258
- config .DialFromEndpointContainer ("http" , config .NodeIP , httpPort , config .MaxTries , 0 , config .EndpointHostnames ())
297
+ err = config .DialFromEndpointContainer ("http" , config .NodeIP , httpPort , config .MaxTries , 0 , config .EndpointHostnames ())
298
+ if err != nil {
299
+ framework .Failf ("failed dialing endpoint, %v" , err )
300
+ }
259
301
})
260
302
261
303
ginkgo .It ("should update endpoints: http" , func () {
262
304
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
263
305
ginkgo .By (fmt .Sprintf ("dialing(http) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterHTTPPort ))
264
- config .DialFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
265
-
306
+ err := config .DialFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , config .EndpointHostnames ())
307
+ if err != nil {
308
+ framework .Failf ("failed dialing endpoint, %v" , err )
309
+ }
266
310
config .DeleteNetProxyPod ()
267
311
268
312
ginkgo .By (fmt .Sprintf ("dialing(http) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterHTTPPort ))
269
- config .DialFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , config .MaxTries , config .EndpointHostnames ())
313
+ err = config .DialFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , config .MaxTries , config .EndpointHostnames ())
314
+ if err != nil {
315
+ framework .Failf ("failed dialing endpoint, %v" , err )
316
+ }
270
317
})
271
318
272
319
ginkgo .It ("should update endpoints: udp" , func () {
273
320
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
274
321
ginkgo .By (fmt .Sprintf ("dialing(udp) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterUDPPort ))
275
- config .DialFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
276
-
322
+ err := config .DialFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , config .EndpointHostnames ())
323
+ if err != nil {
324
+ framework .Failf ("failed dialing endpoint, %v" , err )
325
+ }
277
326
config .DeleteNetProxyPod ()
278
327
279
328
ginkgo .By (fmt .Sprintf ("dialing(udp) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterUDPPort ))
280
- config .DialFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , config .MaxTries , config .EndpointHostnames ())
329
+ err = config .DialFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , config .MaxTries , config .EndpointHostnames ())
330
+ if err != nil {
331
+ framework .Failf ("failed dialing endpoint, %v" , err )
332
+ }
281
333
})
282
334
283
335
// Slow because we confirm that the nodePort doesn't serve traffic, which requires a period of polling.
@@ -344,14 +396,20 @@ var _ = SIGDescribe("Networking", func() {
344
396
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
345
397
ginkgo .By (fmt .Sprintf ("dialing(http) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterHTTPPort ))
346
398
message := strings .Repeat ("42" , 1000 )
347
- config .DialEchoFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , message )
399
+ err := config .DialEchoFromTestContainer ("http" , config .ClusterIP , e2enetwork .ClusterHTTPPort , config .MaxTries , 0 , message )
400
+ if err != nil {
401
+ framework .Failf ("failed dialing endpoint, %v" , err )
402
+ }
348
403
})
349
404
350
405
ginkgo .It ("should be able to handle large requests: udp" , func () {
351
406
config := e2enetwork .NewNetworkingTestConfig (f , false , false )
352
407
ginkgo .By (fmt .Sprintf ("dialing(udp) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterUDPPort ))
353
408
message := "n" + strings .Repeat ("o" , 1999 )
354
- config .DialEchoFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , message )
409
+ err := config .DialEchoFromTestContainer ("udp" , config .ClusterIP , e2enetwork .ClusterUDPPort , config .MaxTries , 0 , message )
410
+ if err != nil {
411
+ framework .Failf ("failed dialing endpoint, %v" , err )
412
+ }
355
413
})
356
414
})
357
415
@@ -361,7 +419,10 @@ var _ = SIGDescribe("Networking", func() {
361
419
config := e2enetwork .NewNetworkingTestConfig (f , false , true )
362
420
ginkgo .By (fmt .Sprintf ("dialing(sctp) %v --> %v:%v (config.clusterIP)" , config .TestContainerPod .Name , config .ClusterIP , e2enetwork .ClusterSCTPPort ))
363
421
message := "hello"
364
- config .DialEchoFromTestContainer ("sctp" , config .TestContainerPod .Status .PodIP , e2enetwork .EndpointSCTPPort , config .MaxTries , 0 , message )
422
+ err := config .DialEchoFromTestContainer ("sctp" , config .TestContainerPod .Status .PodIP , e2enetwork .EndpointSCTPPort , config .MaxTries , 0 , message )
423
+ if err != nil {
424
+ framework .Failf ("failed dialing endpoint, %v" , err )
425
+ }
365
426
})
366
427
367
428
ginkgo .It ("should recreate its iptables rules if they are deleted [Disruptive]" , func () {
0 commit comments