Skip to content

Commit

Permalink
Problem: travis user can't access pulp db
Browse files Browse the repository at this point in the history
Solution: explicitly grant permissions to travis user

[noissue]
  • Loading branch information
dkliban committed Apr 24, 2019
1 parent 7e43d21 commit c8de82c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .travis/before_install.sh
Expand Up @@ -53,7 +53,11 @@ fi


if [ "$DB" = 'mariadb' ]; then
mysql -e 'CREATE DATABASE pulp;'
# working around https://travis-ci.community/t/mariadb-build-error-with-xenial/3160
mysql -u root -e "DROP USER IF EXISTS 'travis'@'%';"
mysql -u root -e "CREATE USER 'travis'@'%';"
mysql -u root -e "CREATE DATABASE pulp;"
mysql -u root -e "GRANT ALL PRIVILEGES ON pulp.* TO 'travis'@'%';";
else
psql -c 'CREATE DATABASE pulp OWNER travis;'
fi
Expand Down

0 comments on commit c8de82c

Please sign in to comment.