@@ -214,62 +214,53 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
214
214
conn , err := next (ctx , network , addr )
215
215
return & writeThrottledConn {
216
216
Conn : conn ,
217
- chunkSize : 50 ,
217
+ chunkSize : len ( host ) / 3 ,
218
218
}, err
219
219
}
220
220
}
221
- tries := 3
222
221
223
222
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
+ f .HTTPTestClientWithTLSConfig (tlsConfig ).
224
+ GET ("/" ).
225
+ WithURL (url ).
226
+ ForceResolve (f .GetNginxIP (), 443 ).
227
+ WithDialContextMiddleware (throttleMiddleware ).
228
+ Expect ().
229
+ Status (http .StatusOK )
233
230
})
234
231
235
232
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
+ //nolint:gosec // Ignore the gosec error in testing
234
+ f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
235
+ GET ("/" ).
236
+ WithURL (url ).
237
+ ForceResolve (f .GetNginxIP (), 443 ).
238
+ WithDialContextMiddleware (throttleMiddleware ).
239
+ Expect ().
240
+ Status (http .StatusOK )
246
241
})
247
242
248
243
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
+ f .HTTPTestClientWithTLSConfig (tlsConfig ).
245
+ GET ("/" ).
246
+ WithURL (url ).
247
+ WithHeader ("Host" , host ).
248
+ ForceResolve (f .GetNginxIP (), 443 ).
249
+ WithDialContextMiddleware (throttleMiddleware ).
250
+ Expect ().
251
+ Status (http .StatusOK )
259
252
})
260
253
261
254
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
+ //nolint:gosec // Ignore the gosec error in testing
256
+ f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
257
+ GET ("/" ).
258
+ WithURL (url ).
259
+ WithHeader ("Host" , host ).
260
+ ForceResolve (f .GetNginxIP (), 443 ).
261
+ WithDialContextMiddleware (throttleMiddleware ).
262
+ Expect ().
263
+ Status (http .StatusOK )
273
264
})
274
265
})
275
266
})
0 commit comments