Commit c0ec0023 authored by Johannes Meyer's avatar Johannes Meyer

Outsource test preparation to its own script

parent fa5db4c2
#!/bin/bash
set -ex
if [ -d archive ]; then
cd archive
apt-ftparchive packages . > Packages
sudo su -c 'echo "deb [trusted=yes] file:$(pwd)/ ./" >> /etc/apt/sources.list'
sudo apt-get update -y
fi
sudo apt-get install -y --force-yes icingaweb2 apache2
sudo apache2ctl start || echo "apache2ctl start failed"
#!/bin/bash
set -ex
SCRIPT_HOME="$(dirname "$(readlink -f "$0")")"
if [ -d archive ]; then
cd archive
apt-ftparchive packages . > Packages
sudo su -c 'echo "deb [trusted=yes] file:$(pwd)/ ./" >> /etc/apt/sources.list'
sudo apt-get update -y
if ! $SCRIPT_HOME/prepare_test.sh; then
exit 1
fi
sudo apt-get install -y --force-yes icingaweb2 apache2
sudo apache2ctl start || echo "apache2ctl start failed"
RSTATUS=$(curl -s -w "%{http_code}" http://localhost/icingaweb2/authentication/login -o /dev/null)
if [ "200" != "$RSTATUS" ]; then
echo "Http exit code was not ok!"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment