diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/configuration.nix | 5 | ||||
| -rwxr-xr-x | tests/run-tests.sh | 57 |
2 files changed, 31 insertions, 31 deletions
diff --git a/tests/configuration.nix b/tests/configuration.nix index ef9476d..5ab52d1 100644 --- a/tests/configuration.nix +++ b/tests/configuration.nix @@ -42,7 +42,7 @@ in services.resolved.enable = lib.mkForce false; - services.searx.settings.server.limiter = lib.mkForce false; + # services.searx.settings.server.limiter = lib.mkForce false; services.rss-bridge.debug = true; @@ -50,7 +50,8 @@ in services.nginx.virtualHosts = { quentin = nginxMakeLocal 8080; - "searx.aristote.fr" = nginxMakeLocal 8081; + "searx" = nginxMakeLocal 8081; + # "searx.aristote.fr" = nginxMakeLocal 8081; rss = nginxMakeLocal 8082; webkeydirectory = nginxMakeLocal 8083; mesh = nginxMakeLocal 8084; 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." |
