mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-24 19:42:07 +03:00
adjust the aws-sigv4 test to fake correct output on machines with too old libcurl
This commit is contained in:
parent
78a45f1f33
commit
5eae6edba3
@ -1,3 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl --user someAccessKeyId:someSecretKey tests_ok/aws_sigv4.hurl --verbose
|
||||
set -uo pipefail
|
||||
|
||||
# FIXME: remove this workaround once all integration test targets have aws-sigv4 support in libcurl
|
||||
#
|
||||
# for integration test targets that come with a too old libcurl, we accept the appropriate error
|
||||
# message and fake the correct result (but only if `curl` doesn't know about `--aws-sigv4` either!).
|
||||
|
||||
output_curl=$(curl --aws-sigv4 2>&1)
|
||||
output_hurl=$(hurl --user someAccessKeyId:someSecretKey tests_ok/aws_sigv4.hurl 2>&1 )
|
||||
rc="$?"
|
||||
|
||||
if echo "$output_curl" | grep -q 'option --aws-sigv4: is unknown'; then
|
||||
# curl on this system does not support --aws-sigv4, so check for the expected error message
|
||||
|
||||
if echo "$output_hurl" | grep -q "Option aws-sigv4 requires libcurl version 7.75.0 or higher"; then
|
||||
cat tests_ok/aws_sigv4.out
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "$output_hurl"
|
||||
exit "$rc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user