Skip to content

Commit 0f48040

Browse files
committed
fix tests
1 parent c97bcbb commit 0f48040

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/e2e/settings/ssl_passthrough.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,15 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
175175
return strings.Contains(server, "listen 442")
176176
})
177177

178+
//nolint:gosec // Ignore the gosec error in testing
178179
f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: host, InsecureSkipVerify: true}).
179180
GET("/").
180181
WithURL(url).
181182
ForceResolve(f.GetNginxIP(), 443).
182183
Expect().
183184
Status(http.StatusOK)
184185

186+
//nolint:gosec // Ignore the gosec error in testing
185187
f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: hostBad, InsecureSkipVerify: true}).
186188
GET("/").
187189
WithURL(urlBad).
@@ -220,6 +222,19 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
220222

221223
ginkgo.It("should handle known traffic without Host header", func() {
222224
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+
}
233+
})
234+
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
223238
f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: host, InsecureSkipVerify: true}).
224239
GET("/").
225240
WithURL(url).
@@ -245,6 +260,7 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
245260

246261
ginkgo.It("should handle insecure traffic with Host header", func() {
247262
for i := 0; i < tries; i++ {
263+
//nolint:gosec // Ignore the gosec error in testing
248264
f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: host, InsecureSkipVerify: true}).
249265
GET("/").
250266
WithURL(url).

0 commit comments

Comments
 (0)