Skip to content

Commit

Permalink
Newer curl version don't allow headerless HTTP
Browse files Browse the repository at this point in the history
Allow http0.9 to some curl calls to not break tests.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
  • Loading branch information
rmohr committed Dec 22, 2020
1 parent 98ee50e commit 4aaf099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func NewHelloWorldJobUDP(host string, port string, checkConnectivityCmdPrefixes
// This pod tries to contact the host on the provided port, over HTTP.
// On success - it expects to receive "Hello World!".
func NewHelloWorldJobHTTP(host string, port string, checkConnectivityCmdPrefixes ...string) *batchv1.Job {
check := fmt.Sprintf(`set -x; %sx="$(head -n 1 < <(curl %s:%s))"; echo "$x" ; if [ "$x" = "Hello World!" ]; then echo "succeeded"; exit 0; else echo "failed"; exit 1; fi`, strings.Join(checkConnectivityCmdPrefixes, ";"), FormatIPForURL(host), port)
check := fmt.Sprintf(`set -x; %sx="$(head -n 1 < <(curl --http0.9 %s:%s))"; echo "$x" ; if [ "$x" = "Hello World!" ]; then echo "succeeded"; exit 0; else echo "failed"; exit 1; fi`, strings.Join(checkConnectivityCmdPrefixes, ";"), FormatIPForURL(host), port)
return newHelloWorldJob(check)
}

Expand Down

0 comments on commit 4aaf099

Please sign in to comment.