diff options
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/apache2 | 24 | ||||
-rw-r--r-- | debian/tests/control | 19 | ||||
-rw-r--r-- | debian/tests/nginx (renamed from debian/tests/general) | 9 |
3 files changed, 48 insertions, 4 deletions
diff --git a/debian/tests/apache2 b/debian/tests/apache2 new file mode 100644 index 0000000..37ea62e --- /dev/null +++ b/debian/tests/apache2 @@ -0,0 +1,24 @@ +#!/bin/sh + +set -ex + +rm /etc/apache2/sites-enabled/000-default.conf +cp /usr/share/doc/searx/examples/apache2/sites-available/searx.conf /etc/apache2/sites-available/ +ln -s ../sites-available/searx.conf /etc/apache2/sites-enabled/searx.conf +a2enmod proxy +a2enmod proxy_uwsgi +a2enmod uwsgi + +cp /usr/share/doc/searx/examples/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-available +ln -s ../apps-available/searx.ini /etc/uwsgi/apps-enabled/searx.ini +mkdir /etc/searx +cp /usr/share/doc/searx/examples/settings.yml /etc/searx/settings.yml +sed -i -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" /etc/searx/settings.yml +systemctl restart apache2 +systemctl restart uwsgi +sleep 5 +systemctl status apache2 +systemctl status uwsgi +cat /var/log/uwsgi/app/searx.log +curl http://localhost/searx/ +curl http://localhost/searx/ | grep '<input type="search".* name="q"' diff --git a/debian/tests/control b/debian/tests/control index dbabf19..da24578 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,18 @@ -Tests: general +Tests: nginx Restrictions: allow-stderr, isolation-container, needs-root -Depends: @, curl, nginx, uwsgi, uwsgi-plugin-python3 +Depends: + curl, + nginx, + uwsgi, + uwsgi-plugin-python3, + @, + +Tests: apache2 +Restrictions: allow-stderr, isolation-container, needs-root +Depends: + apache2, + curl, + libapache2-mod-uwsgi, + uwsgi, + uwsgi-plugin-python3, + @, diff --git a/debian/tests/general b/debian/tests/nginx index 2dfba3f..df20ec3 100644 --- a/debian/tests/general +++ b/debian/tests/nginx @@ -8,8 +8,13 @@ ln -s ../sites-available/searx /etc/nginx/sites-enabled/searx cp /usr/share/doc/searx/examples/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-available ln -s ../apps-available/searx.ini /etc/uwsgi/apps-enabled/searx.ini mkdir /etc/searx -gzip --to-stdout --decompress /usr/share/doc/searx/examples/settings.yml.gz > /etc/searx/settings.yml +cp /usr/share/doc/searx/examples/settings.yml /etc/searx/settings.yml sed -i -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" /etc/searx/settings.yml systemctl restart nginx systemctl restart uwsgi -curl localhost | grep 'input type="search" name="q"' +sleep 5 +systemctl status nginx +systemctl status uwsgi +cat /var/log/uwsgi/app/searx.log +curl localhost +curl localhost | grep '<input type="search".* name="q"' |