Add unit tests

This commit is contained in:
Hongli Lai (Phusion)
2014-02-03 17:01:11 +01:00
parent 64c7d8be7c
commit 1463b81942
3 changed files with 60 additions and 1 deletions

22
test/test.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -o pipefail
function ok()
{
echo " OK"
}
function fail()
{
echo " FAIL"
exit 1
}
echo "Checking whether all services are running..."
services=`sv status /etc/service/*`
status=$?
if [[ "$status" != 0 || "$services" = "" || "$services" =~ down ]]; then
fail
else
ok
fi