Add a test if command not found
This commit is contained in:
parent
43aa97edcc
commit
8d50b69bce
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue