summaryrefslogtreecommitdiff
path: root/tests/run-tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-tests.sh')
-rwxr-xr-xtests/run-tests.sh57
1 files changed, 28 insertions, 29 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 77fabd6..ca931bc 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -32,12 +32,11 @@ do
URL="http://$IP:${PORTS[$SERVICE]}/"
echo Checking connection to container version of $SERVICE.aristote.fr ...
RESULT=$(curl "$URL" $CURL_FLAGS --output /dev/null --write-out '%{http_code}\n')
- if [[ ! "$RESULT" = 200 ]]
- then
- echo "Connection failed."
- else
- echo "Up and running at $URL !"
- fi
+ case "$RESULT" in
+ 200) echo "Up and running at $URL !";;
+ 301) echo "Redirected.";;
+ *) echo "Connection failed.";;
+ esac
done
echo Checking connection to container version of mesh.aristote.fr ...
URL="http://$IP:8084/health"
@@ -88,29 +87,29 @@ 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 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."