From 461bb22d7d1b9a5d0abe7ad0299e04386a198ff8 Mon Sep 17 00:00:00 2001 From: siddharth Date: Fri, 19 Apr 2024 14:03:40 +0530 Subject: [PATCH] test: adding voucher somektest --- ci/tasks/voucher-smoketest.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 ci/tasks/voucher-smoketest.sh 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;