@@ -220,56 +220,48 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
220
220
}
221
221
tries := 3
222
222
223
- ginkgo .It ("should handle known traffic without Host header" , func () {
224
- for i := 0 ; i < tries ; i ++ {
225
- f .HTTPTestClientWithTLSConfig (tlsConfig ).
226
- GET ("/" ).
227
- WithURL (url ).
228
- ForceResolve (f .GetNginxIP (), 443 ).
229
- WithDialContextMiddleware (throttleMiddleware ).
230
- Expect ().
231
- Status (http .StatusOK )
232
- }
223
+ ginkgo .It ("should handle known traffic without Host header" , ginkgo .MustPassRepeatedly (tries ), func () {
224
+ f .HTTPTestClientWithTLSConfig (tlsConfig ).
225
+ GET ("/" ).
226
+ WithURL (url ).
227
+ ForceResolve (f .GetNginxIP (), 443 ).
228
+ WithDialContextMiddleware (throttleMiddleware ).
229
+ Expect ().
230
+ Status (http .StatusOK )
233
231
})
234
232
235
- ginkgo .It ("should handle insecure traffic without Host header" , func () {
236
- for i := 0 ; i < tries ; i ++ {
237
- //nolint:gosec // Ignore the gosec error in testing
238
- f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
239
- GET ("/" ).
240
- WithURL (url ).
241
- ForceResolve (f .GetNginxIP (), 443 ).
242
- WithDialContextMiddleware (throttleMiddleware ).
243
- Expect ().
244
- Status (http .StatusOK )
245
- }
233
+ ginkgo .It ("should handle insecure traffic without Host header" , ginkgo .MustPassRepeatedly (tries ), func () {
234
+ //nolint:gosec // Ignore the gosec error in testing
235
+ f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
236
+ GET ("/" ).
237
+ WithURL (url ).
238
+ ForceResolve (f .GetNginxIP (), 443 ).
239
+ WithDialContextMiddleware (throttleMiddleware ).
240
+ Expect ().
241
+ Status (http .StatusOK )
246
242
})
247
243
248
- ginkgo .It ("should handle known traffic with Host header" , func () {
249
- for i := 0 ; i < tries ; i ++ {
250
- f .HTTPTestClientWithTLSConfig (tlsConfig ).
251
- GET ("/" ).
252
- WithURL (url ).
253
- WithHeader ("Host" , host ).
254
- ForceResolve (f .GetNginxIP (), 443 ).
255
- WithDialContextMiddleware (throttleMiddleware ).
256
- Expect ().
257
- Status (http .StatusOK )
258
- }
244
+ ginkgo .It ("should handle known traffic with Host header" , ginkgo .MustPassRepeatedly (tries ), func () {
245
+ f .HTTPTestClientWithTLSConfig (tlsConfig ).
246
+ GET ("/" ).
247
+ WithURL (url ).
248
+ WithHeader ("Host" , host ).
249
+ ForceResolve (f .GetNginxIP (), 443 ).
250
+ WithDialContextMiddleware (throttleMiddleware ).
251
+ Expect ().
252
+ Status (http .StatusOK )
259
253
})
260
254
261
- ginkgo .It ("should handle insecure traffic with Host header" , func () {
262
- for i := 0 ; i < tries ; i ++ {
263
- //nolint:gosec // Ignore the gosec error in testing
264
- f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
265
- GET ("/" ).
266
- WithURL (url ).
267
- WithHeader ("Host" , host ).
268
- ForceResolve (f .GetNginxIP (), 443 ).
269
- WithDialContextMiddleware (throttleMiddleware ).
270
- Expect ().
271
- Status (http .StatusOK )
272
- }
255
+ ginkgo .It ("should handle insecure traffic with Host header" , ginkgo .MustPassRepeatedly (tries ), func () {
256
+ //nolint:gosec // Ignore the gosec error in testing
257
+ f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
258
+ GET ("/" ).
259
+ WithURL (url ).
260
+ WithHeader ("Host" , host ).
261
+ ForceResolve (f .GetNginxIP (), 443 ).
262
+ WithDialContextMiddleware (throttleMiddleware ).
263
+ Expect ().
264
+ Status (http .StatusOK )
273
265
})
274
266
})
275
267
})
0 commit comments