feat(docker): force test db configuration

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-27 22:42:12 -08:00
parent 0e938209af
commit f3efc18b50
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -5,4 +5,16 @@ set -eou pipefail
cp -vf conf/config.dev conf/config cp -vf conf/config.dev conf/config
sed -i "s;YOUR_AUR_ROOT;$(pwd);g" conf/config sed -i "s;YOUR_AUR_ROOT;$(pwd);g" conf/config
# We use the root user for testing in Docker.
# The test user must be able to create databases and drop them.
aurweb-config set database user 'root'
aurweb-config set database host 'localhost'
aurweb-config set database socket '/var/run/mysqld/mysqld.sock'
# Remove possibly problematic configuration options.
# We depend on the database socket within Docker and
# being run as the root user.
aurweb-config unset database password
aurweb-config unset database port
exec "$@" exec "$@"