Commit f2f50580 authored by Pierre Ozoux's avatar Pierre Ozoux

Adds tests after reboot / big refactor

parent 832a4398
......@@ -53,5 +53,11 @@ vagrant up
# Set up example.dev as above, and test https://example.dev in your browser
vagrant ssh core-1
sudo su
/data/indiehosters/tests/main.sh
/data/indiehosters/tests/start.sh
exit
exit
vagrant reload --provision
vagrant ssh core-1
sudo su
/data/indiehosters/tests/finish.sh
```
......@@ -2,7 +2,11 @@
image=$1
/data/indiehosters/tests/runtime-clean-image.sh $image
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
rm -rf /data/domains/$image.test
ssh core@backup.dev "rm -rf $image.test"
systemctl disable $image@$image.test
#!/bin/bash -eux
image=$1
/data/indiehosters/tests/clean-image.sh $image
ssh core@backup.dev "rm -rf $image.test"
#!/bin/bash -eux
systemctl list-units | grep failed
applications=( static static-git wordpress known)
for application in "${applications[@]}"
do
/data/indiehosters/tests/test-image.sh $application
/data/indiehosters/tests/deep-clean.sh $application
done
......@@ -15,26 +15,15 @@ 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
/data/indiehosters/tests/test-image.sh $image
# 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
## make sure to backup first
systemctl start backup@$image.test
/data/indiehosters/tests/clean-image.sh $image
systemctl enable $image@$image.test
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
/data/indiehosters/tests/test-image.sh $image
#!/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
#!/bin/bash -eux
applications=( static static-git wordpress known)
for application in "${applications[@]}"
do
/data/indiehosters/tests/image.sh $application
done
#!/bin/bash -eux
image=$1
if [ "$image" == "wordpress" ] || [ "$image" == "known" ]; then
sleep 70
else
sleep 10
fi
systemctl list-units | grep "$image\.test" | grep -c failed | grep 0
ip=`docker inspect --format {{.NetworkSettings.IPAddress}} $image-$image.test`
curl -L $ip
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