Skip to content
Snippets Groups Projects
Commit 11cf094c authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Adds tests \o/

parent 5d6d2544
No related branches found
No related tags found
No related merge requests found
#!/bin/bash -eux
image=$1
/data/indiehosters/tests/runtime-clean-image.sh $image
rm -rf /data/domains/$image.test
ssh core@backup.dev "rm -rf $image.test"
#!/bin/bash -eux
cp /data/indiehosters/unit-files/* /etc/systemd/system && sudo systemctl daemon-reload
image=$1
# prepare data
mkdir -p /data/import/$image.test/TLS
cp /data/indiehosters/scripts/unsecure-certs/example.dev.pem /data/import/$image.test/TLS/$image.test.pem
if [ "$image" == "static-git" ]; then
mkdir -p /data/import/$image.test/static-git
echo "https://github.com/indiehosters/website.git" > /data/import/$image.test/static-git/GITURL
fi
# start image from import
systemctl start $image@$image.test
if [ "$image" == "wordpress" ]; then
sleep 40
else
sleep 10
fi
# tests
systemctl list-units | grep "$image\.test" | grep -c failed | grep 0
ip=`docker inspect --format {{.NetworkSettings.IPAddress}} $image-$image.test`
curl -L $ip
# start image from backup
/data/indiehosters/tests/runtime-clean-image.sh $image
if [ "$image" == "wordpress" ]; then
echo should fail until implementation of mysql backup importer
fi
systemctl start $image@$image.test
sleep 10
# tests
systemctl list-units | grep "$image\.test" | grep -c failed | grep 0
ip=`docker inspect --format {{.NetworkSettings.IPAddress}} $image-$image.test`
curl $ip
#!/bin/bash -eux
# testing static
/data/indiehosters/tests/image.sh static
# clean static tests
/data/indiehosters/tests/clean-image.sh static
# testing static-git
/data/indiehosters/tests/image.sh static-git
# clean static tests
/data/indiehosters/tests/clean-image.sh static-git
# testing wordpress
/data/indiehosters/tests/image.sh wordpress
# clean static tests
/data/indiehosters/tests/clean-image.sh wordpress
#!/bin/bash -eux
image=$1
systemctl stop *@$image.test.timer
systemctl stop *@$image.test
systemctl reset-failed
systemctl list-units | grep -c "$image\.test" | grep 0
rm -rf /data/import/$image.test
rm -rf /data/runtime/domains/$image.test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment