Skip to content

Commit

Permalink
test: adding voucher somektest
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 committed Apr 19, 2024
1 parent 91c46fd commit 461bb22
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ci/tasks/voucher-smoketest.sh
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 461bb22

Please sign in to comment.