summaryrefslogtreecommitdiff
path: root/tests/run-tests.sh
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-01-29 13:28:04 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-01-29 13:28:04 +0100
commit96452d85771fb6237cc8f0b1c8c0686c52c466a6 (patch)
tree198e390257ac9790934c4077ac6aa5ab385a62ee /tests/run-tests.sh
parent3024af143601608f2a882c24dde2bac9142d88b9 (diff)
tests: searx tests go last
Diffstat (limited to 'tests/run-tests.sh')
-rwxr-xr-xtests/run-tests.sh55
1 files changed, 29 insertions, 26 deletions
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."