treewide: curl: exit with error status on HTTP errors

This makes scripts fail early on request errors.
Previously, curl exited with status 0 when enountering HTTP error status
codes.
`-fsS` equals `--fail --silent --show-error`.
This commit is contained in:
Erik Arvstedt 2022-05-17 13:18:38 +02:00
parent 63b3eec9cd
commit 84fe731c94
No known key found for this signature in database
GPG key ID: 33312B944DD97846
4 changed files with 8 additions and 8 deletions

View file

@ -203,13 +203,13 @@ def _():
wait_for_open_port(ip("btcpayserver"), 23000)
# test lnd custom macaroon
assert_matches(
"runuser -u btcpayserver -- curl -s --cacert /secrets/lnd-cert "
"runuser -u btcpayserver -- curl -fsS --cacert /secrets/lnd-cert "
'--header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 /run/lnd/btcpayserver.macaroon)" '
f"-X GET https://{ip('lnd')}:8080/v1/getinfo | jq",
'"version"',
)
# Test web server response
assert_matches(f"curl -L {ip('btcpayserver')}:23000", "Welcome to your BTCPay Server")
assert_matches(f"curl -fsS -L {ip('btcpayserver')}:23000", "Welcome to your BTCPay Server")
@test("rtl")
def _():
@ -230,7 +230,7 @@ def _():
assert_running("spark-wallet")
wait_for_open_port(ip("spark-wallet"), 9737)
spark_auth = re.search("login=(.*)", succeed("cat /secrets/spark-wallet-login"))[1]
assert_matches(f"curl -s {spark_auth}@{ip('spark-wallet')}:9737", "Spark")
assert_matches(f"curl -fsS {spark_auth}@{ip('spark-wallet')}:9737", "Spark")
@test("joinmarket")
def _():