add database run check

check that the database that we think we should have used actually
created a log directory, which means it was installed. Not a
perfect check, but a starting point for double entry accounting
so that devstack changes don't break us.

Change-Id: Ib7302894bfeb1016b15eba9e82312a7a915604fa
This commit is contained in:
Sean Dague
2013-04-23 14:44:12 -04:00
parent 198a1d19b9
commit cb8508b148

View File

@@ -187,6 +187,19 @@ else
echo "Running devstack"
sudo -H -u stack ./stack.sh
# provide a check that the right db was running
if [ "$DEVSTACK_GATE_POSTGRES" -eq "1" ]; then
if [ ! -d /var/log/postgresql ]; then
echo "Postgresql should have been used, but there are no logs"
exit 1
fi
else
if [ ! -d /var/log/mysql ]; then
echo "Mysql should have been used, but there are no logs"
exit 1
fi
fi
echo "Removing sudo privileges for devstack user"
sudo rm /etc/sudoers.d/50_stack_sh