From 8d50b69bce7f6554bb1f4e2e75bc3d035a5b24c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Oct 2025 13:30:36 +0200 Subject: [PATCH] Add a test if command not found --- test/hurl/run.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/hurl/run.sh b/test/hurl/run.sh index db96888494a..d4045574a44 100755 --- a/test/hurl/run.sh +++ b/test/hurl/run.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Script to run unit tests on API with hurl +# if [[ -z ${DOLIHOST+x} ]]; then DOLIHOST="localhost" @@ -16,6 +18,12 @@ if [[ "" != "${DOLISUBURL}" ]]; then hostnport="${hostnport}/${DOLISUBURL}" fi +echo "----- Run hurl test on APIs ---" +if ! command -v hurl &> /dev/null; then + echo The command hurl must be available. + exit 1 +fi + echo "First we run tests that do not require authentication" find api/ gui/ public/ -type f -iname '00*.hurl' -exec hurl --variable "hostnport=${hostnport}" --test "{}" + || exit 1