From 96452d85771fb6237cc8f0b1c8c0686c52c466a6 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Thu, 29 Jan 2026 13:28:04 +0100 Subject: tests: searx tests go last --- tests/run-tests.sh | 55 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) (limited to 'tests/run-tests.sh') diff --git a/tests/run-tests.sh b/tests/run-tests.sh index fec746c..e01d239 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -43,29 +43,6 @@ do done echo Done. -echo -echo Checking custom Searx engines : -declare -A QUERIES -QUERIES[alternativeto]=Searx -QUERIES[nlab]='Kan%20extension' -QUERIES[wfr]=Paris -QUERIES[wen]=Paris -for ENGINE in "${!QUERIES[@]}" -do - echo Checking engine $ENGINE ... - 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." - elif [[ "$RESULTS" = [] ]] - then - echo "No results found." - fi -done -echo Done. echo echo Checking custom RSS bridges : @@ -81,6 +58,7 @@ do done echo Done. + echo echo Checking web keys directory : KEYS="$(ls ../config/services/web/webkeydirectory/hu)" @@ -101,15 +79,40 @@ then fi echo Done. + echo -echo Checking cgit internal hyperlinks : +echo Checking cgit instance: +echo Checking internal hyperlinks ... RESULT=$(curl "http://$IP:${PORTS[git]}/" $CURL_FLAGS) if [[ $(echo "$RESULT" | grep "=\'/git/" > /dev/null) ]] then echo "Broken hyperlinks detected." -else - echo "The hyperlinks look fine." fi +echo Done. + + +echo Checking custom Searx engines : +declare -A QUERIES +QUERIES[alternativeto]=Searx +QUERIES[nlab]='Kan%20extension' +QUERIES[wfr]=Paris +QUERIES[wen]=Paris +for ENGINE in "${!QUERIES[@]}" +do + echo Checking engine $ENGINE ... + 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." + elif [[ "$RESULTS" = [] ]] + then + echo "No results found." + fi +done +echo Done. echo read -n1 -srp "Press any key to stop the server." -- cgit v1.2.3