e2e: expand error conditions when test-ing port-forward

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
This commit is contained in:
Maciej Szulik 2025-01-30 19:07:28 +01:00
parent 814e2c89a8
commit 4619a89eba
No known key found for this signature in database
GPG Key ID: F15E55D276FA84C4

View File

@ -617,7 +617,8 @@ var _ = SIGDescribe("Kubectl Port forwarding", func() {
// this error indicates timeout when POST-ing data
gomega.ContainSubstring("context deadline exceeded"),
// this will happen when trying to write to a closed connection
gomega.ContainSubstring("write: broken pipe"), gomega.ContainSubstring("closed network connection")))
gomega.ContainSubstring("write: broken pipe"), gomega.ContainSubstring("closed network connection"),
gomega.ContainSubstring("connect: connection refused")))
ginkgo.By("Check kubectl port-forward exit code")
gomega.Expect(cmd.cmd.ProcessState.ExitCode()).To(gomega.BeNumerically("<", 0), "kubectl port-forward should finish with non-zero exit code")