Skip to content

Commit 7b7d4ef

Browse files
Merge pull request #28327 from openshift-cherrypick-robot/cherry-pick-28151-to-release-4.12
[release-4.12] Bug OCPBUGS-20557: Correct condition for rejecting connection
2 parents dc737e6 + 2d1b8cf commit 7b7d4ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/extended/csrapprover/csrapprover.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ var _ = g.Describe("[sig-cluster-lifecycle]", func() {
6868
internalAPI.Path = "/config/master"
6969

7070
// we should not be able to reach the endpoint
71-
curlOutput, err := pod.Exec(fmt.Sprintf("curl -k %s", internalAPI.String()))
71+
curlOutput, err := pod.Exec(fmt.Sprintf("curl --connect-timeout 5 -k %s", internalAPI.String()))
7272
o.Expect(err).To(o.HaveOccurred())
73-
o.Expect(curlOutput).To(o.ContainSubstring("Connection refused"))
73+
o.Expect(curlOutput).To(o.Or(o.ContainSubstring("Connection refused"), o.ContainSubstring("Connection timed out")))
7474
})
7575

7676
g.It("CSRs from machines that are not recognized by the cloud provider are not approved [apigroup:config.openshift.io]", func() {

0 commit comments

Comments
 (0)