diff --git a/changelog/v1.17.0-beta35/eventually-curl-succeeds-ignores-errors.yaml b/changelog/v1.17.0-beta35/eventually-curl-succeeds-ignores-errors.yaml new file mode 100644 index 00000000000..93e8e326901 --- /dev/null +++ b/changelog/v1.17.0-beta35/eventually-curl-succeeds-ignores-errors.yaml @@ -0,0 +1,7 @@ +changelog: + - type: NON_USER_FACING + issueLink: https://github.com/solo-io/gloo/issues/9570 + resolvesIssue: true + description: >- + Fix regression in `CurlEventuallyShouldOutput` that caused it to succeed on curl errors. + Regression has not been released, so no user facing documentation needed diff --git a/test/kube2e/helper/curl.go b/test/kube2e/helper/curl.go index 7e5c6100043..5b79445b5d9 100644 --- a/test/kube2e/helper/curl.go +++ b/test/kube2e/helper/curl.go @@ -91,21 +91,15 @@ func (t *testContainer) CurlEventuallyShouldOutput(opts CurlOpts, expectedOutput // for some useful-ish output tick := time.Tick(currentTimeout / 8) + Expect(t.CanCurl()).To(BeTrue()) EventuallyWithOffset(ginkgoOffset+1, func(g Gomega) { - g.Expect(t.CanCurl()).To(BeTrue()) var res string bufChan, done, err := t.CurlAsyncChan(opts) - if err != nil { - // trigger an early exit if the pod has been deleted - // if we return an error here, the Eventually will continue. By making an - // assertion with the outer context's Gomega, we can trigger a failure at - // that outer scope. - g.Expect(err).NotTo(MatchError(ContainSubstring(`pods "testserver" not found`))) - return - } + g.Expect(err).NotTo(HaveOccurred()) + defer close(done) var buf io.Reader select {