diff --git a/ci/tasks/voucher-smoketest.sh b/ci/tasks/voucher-smoketest.sh new file mode 100755 index 0000000000..64260a1d9d --- /dev/null +++ b/ci/tasks/voucher-smoketest.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -eu + +source smoketest-settings/helpers.sh + +host=`setting "voucher_endpoint"` +port=`setting "voucher_port"` + +set +e +for i in {1..15}; do + echo "Attempt ${i} to curl voucher" + curl --location -f ${host}:${port} + if [[ $? == 0 ]]; then success="true"; break; fi; + sleep 1 +done +set -e + +if [[ "$success" != "true" ]]; then echo "Smoke test failed" && exit 1; fi;