diff options
Diffstat (limited to 'tests/run-tests.sh')
| -rwxr-xr-x | tests/run-tests.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh index a309c69..300056e 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -14,6 +14,7 @@ sudo nixos-container start hermes || exit 2 trap cleanup EXIT sleep 0.1 IP=$(nixos-container show-ip hermes) +CURL_FLAGS='--location --silent' echo echo Checking that all the services are running : @@ -21,7 +22,7 @@ declare -A PORTS PORTS[quentin]=8080 PORTS[searx]=8081 PORTS[money]=8082 -CURL_FLAGS='--location --silent' +PORTS[rss]=8083 for SERVICE in "${!PORTS[@]}" do echo Checking connection to container version of $SERVICE.aristote.fr ... @@ -38,7 +39,7 @@ 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 @@ -60,3 +61,18 @@ do fi done echo Done. + +echo +echo Checking custom RSS bridges : +BRIDGES=ParisJazzClub +for BRIDGE in "$BRIDGES" +do + echo Checking bridge $BRIDGE ... + RESULT=$(curl "http://$IP:${PORTS[rss]}/?action=display&bridge=$BRIDGE&format=Plaintext" $CURL_FLAGS --output /dev/null --write-out '%{http_code}\n') + if [[ ! "$RESULT" = 200 ]] + then + echo "Connection failed." + exit 2 + fi +done +echo Done. |
