From 66c0d66d153bfa1cb8b1b9ad470a67544b274fbd Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sun, 5 Dec 2021 14:06:12 +0100 Subject: debug test script --- tests/run-tests.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/run-tests.sh') diff --git a/tests/run-tests.sh b/tests/run-tests.sh index a1404fc..a309c69 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -38,24 +38,25 @@ echo echo Checking custom Searx engines : declare -A QUERIES QUERIES[alternativeto]=Searx -QUERIES[emojipedia]=',,,,,,,,,,,,' #'Thinking%20face' +QUERIES[emojipedia]='Thinking%20Face' QUERIES[nlab]='Kan%20extension' QUERIES[wikipediafr]=Paris QUERIES[wikipediaen]=Paris for ENGINE in "${!QUERIES[@]}" do echo Checking engine $ENGINE ... - JSON_RESULT=$(curl "http://$IP:${PORTS[searx]}/search?q=${QUERIES[$ENGINE]}+\!$ENGINE&format=json" $CURL_FLAGS) + REQUEST_URL="http://$IP:${PORTS[searx]}/search?q=${QUERIES[$ENGINE]}+!$ENGINE&format=json" + JSON_RESULT=$(curl "$REQUEST_URL" $CURL_FLAGS) RESULTS=$(echo $JSON_RESULT | jq '.results') UNRESPONSIVE_ENGINES=$(echo $JSON_RESULT | jq '.unresponsive_engines') if [[ ! "$UNRESPONSIVE_ENGINES" = '[]' ]] then echo "Engine not responsive." - exit 2 - elif [[ "RESULTS" = [] ]] + # exit 2 + elif [[ "$RESULTS" = [] ]] then echo "No results found." - exit 2 + # exit 2 fi done echo Done. -- cgit v1.2.3