mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
travis-prepare.sh: do not let former failed...
...tests influence the current one: delete the test db in case it exists
This commit is contained in:
parent
a2016e99c0
commit
d86ef63c42
@ -9,10 +9,11 @@ psql_cmd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ "$DB" = mysql ]; then
|
if [ "$DB" = mysql ]; then
|
||||||
mysql -u root -e "CREATE DATABASE ${DIRECTOR_TESTDB};"
|
mysql -u root -e "DROP DATABASE IF EXISTS ${DIRECTOR_TESTDB}; CREATE DATABASE ${DIRECTOR_TESTDB};"
|
||||||
elif [ "$DB" = pgsql ]; then
|
elif [ "$DB" = pgsql ]; then
|
||||||
: "${DIRECTOR_TESTDB_USER:=director_test}"
|
: "${DIRECTOR_TESTDB_USER:=director_test}"
|
||||||
|
|
||||||
|
psql -U postgres postgres -q -c "DROP DATABASE IF EXISTS ${DIRECTOR_TESTDB};"
|
||||||
psql -U postgres postgres -q -c "CREATE DATABASE ${DIRECTOR_TESTDB} WITH ENCODING 'UTF8';"
|
psql -U postgres postgres -q -c "CREATE DATABASE ${DIRECTOR_TESTDB} WITH ENCODING 'UTF8';"
|
||||||
psql_cmd "CREATE USER ${DIRECTOR_TESTDB_USER} WITH PASSWORD 'testing';"
|
psql_cmd "CREATE USER ${DIRECTOR_TESTDB_USER} WITH PASSWORD 'testing';"
|
||||||
psql_cmd "GRANT ALL PRIVILEGES ON DATABASE ${DIRECTOR_TESTDB} TO ${DIRECTOR_TESTDB_USER};"
|
psql_cmd "GRANT ALL PRIVILEGES ON DATABASE ${DIRECTOR_TESTDB} TO ${DIRECTOR_TESTDB_USER};"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user