diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/run-tests.sh | 20 | ||||
| -rw-r--r-- | tests/vm.nix | 8 |
2 files changed, 26 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. diff --git a/tests/vm.nix b/tests/vm.nix index abda6bc..4894cec 100644 --- a/tests/vm.nix +++ b/tests/vm.nix @@ -44,6 +44,14 @@ in { forceSSL = lib.mkForce false; enableACME = lib.mkForce false; }; + rss = { + listen = lib.mkForce [{ + addr = "0.0.0.0"; + port = 8083; + }]; + forceSSL = lib.mkForce false; + enableACME = lib.mkForce false; + }; }; environment.etc."searx/secrets".text = '' |
