aurweb/docker/test-mysql-entrypoint.sh
Kevin Morris bf4662e26f
change(logging): restrict logging.conf & add logging.test.conf
We'll override logging.conf with logging.test.conf for debug logging
needed for tests now, so we can rely on the default logging.conf
for production use.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-17 12:11:08 -08:00

22 lines
671 B
Bash
Executable file

#!/bin/bash
set -eou pipefail
# Set test logging.
cp -vf "logging.test.conf" "logging.conf"
# 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
# Setup notifications for testing.
aurweb-config set notifications sendmail "$(pwd)/util/sendmail"
exec "$@"