Revert "use MustPassRepeatedly"

This reverts commit d344404577.
This commit is contained in:
Chotiwat Chawannakul 2024-02-16 15:09:07 -08:00
parent d344404577
commit 2794f56c0a

View file

@ -220,48 +220,56 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
} }
tries := 3 tries := 3
ginkgo.It("should handle known traffic without Host header", ginkgo.MustPassRepeatedly(tries), func() { ginkgo.It("should handle known traffic without Host header", func() {
f.HTTPTestClientWithTLSConfig(tlsConfig). for i := 0; i < tries; i++ {
GET("/"). f.HTTPTestClientWithTLSConfig(tlsConfig).
WithURL(url). GET("/").
ForceResolve(f.GetNginxIP(), 443). WithURL(url).
WithDialContextMiddleware(throttleMiddleware). ForceResolve(f.GetNginxIP(), 443).
Expect(). WithDialContextMiddleware(throttleMiddleware).
Status(http.StatusOK) Expect().
Status(http.StatusOK)
}
}) })
ginkgo.It("should handle insecure traffic without Host header", ginkgo.MustPassRepeatedly(tries), func() { ginkgo.It("should handle insecure traffic without Host header", func() {
//nolint:gosec // Ignore the gosec error in testing for i := 0; i < tries; i++ {
f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: host, InsecureSkipVerify: true}). //nolint:gosec // Ignore the gosec error in testing
GET("/"). f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: host, InsecureSkipVerify: true}).
WithURL(url). GET("/").
ForceResolve(f.GetNginxIP(), 443). WithURL(url).
WithDialContextMiddleware(throttleMiddleware). ForceResolve(f.GetNginxIP(), 443).
Expect(). WithDialContextMiddleware(throttleMiddleware).
Status(http.StatusOK) Expect().
Status(http.StatusOK)
}
}) })
ginkgo.It("should handle known traffic with Host header", ginkgo.MustPassRepeatedly(tries), func() { ginkgo.It("should handle known traffic with Host header", func() {
f.HTTPTestClientWithTLSConfig(tlsConfig). for i := 0; i < tries; i++ {
GET("/"). f.HTTPTestClientWithTLSConfig(tlsConfig).
WithURL(url). GET("/").
WithHeader("Host", host). WithURL(url).
ForceResolve(f.GetNginxIP(), 443). WithHeader("Host", host).
WithDialContextMiddleware(throttleMiddleware). ForceResolve(f.GetNginxIP(), 443).
Expect(). WithDialContextMiddleware(throttleMiddleware).
Status(http.StatusOK) Expect().
Status(http.StatusOK)
}
}) })
ginkgo.It("should handle insecure traffic with Host header", ginkgo.MustPassRepeatedly(tries), func() { ginkgo.It("should handle insecure traffic with Host header", func() {
//nolint:gosec // Ignore the gosec error in testing for i := 0; i < tries; i++ {
f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: host, InsecureSkipVerify: true}). //nolint:gosec // Ignore the gosec error in testing
GET("/"). f.HTTPTestClientWithTLSConfig(&tls.Config{ServerName: host, InsecureSkipVerify: true}).
WithURL(url). GET("/").
WithHeader("Host", host). WithURL(url).
ForceResolve(f.GetNginxIP(), 443). WithHeader("Host", host).
WithDialContextMiddleware(throttleMiddleware). ForceResolve(f.GetNginxIP(), 443).
Expect(). WithDialContextMiddleware(throttleMiddleware).
Status(http.StatusOK) Expect().
Status(http.StatusOK)
}
}) })
}) })
}) })