1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-08 03:54:20 +01:00

try to check if postgres is running on travis

there seems to be issues where the postgres service isn't started when
our tests are run, would this help?
This commit is contained in:
Klas Lindfors 2014-08-27 08:14:28 +02:00
parent 5891112263
commit fc6f2ca033

View File

@ -8,6 +8,10 @@ if [ "x$DB" = "xmysql" ]; then
mysql -u $dbuser -e 'create database ykval;'
mysql -u $dbuser ykval < ykval-db.sql
elif [ "x$DB" = "xpgsql" ]; then
sudo service postgresql status
if [ $? != 0 ]; then
sudo service postgresql restart
fi
dbuser=postgres
psql -U $dbuser -c 'create database ykval;'