Files
galaxy/test/docker/base/run_test_wrapper.sh
T
John Chilton e99adb5b0f Add --dockerize and --db [postgres|mysql|sqlite] options to run_tests.sh.
Runs tests in a Dockerfile with pre-migrated databases and all testing dependencies (postgres, mysql, npm, casper, phantomjs, etc...). Hopefully this makes it easier to run more interesting tests - down the road I would like to add more options for things like condor, slurm, run as real user, etc....
2015-02-21 13:29:58 -05:00

24 lines
779 B
Bash

#!/bin/bash
set -e
# TODO: switch on environment to boot mysql here...
if [ "$GALAXY_TEST_DATABASE_TYPE" = "postgres" ];
then
su -c '/usr/lib/postgresql/9.3/bin/pg_ctl -o "-F" start -D /opt/galaxy/db' postgres
sleep 3
export GALAXY_TEST_DBURI="postgres://galaxy@localhost:5930/galaxy"
elif [ "$GALAXY_TEST_DATABASE_TYPE" = "mysql" ];
then
sh /opt/galaxy/start_mysql.sh
export GALAXY_TEST_DBURI="mysql://galaxy:galaxy@localhost/galaxy?unix_socket=/var/run/mysqld/mysqld.sock"
elif [ "$GALAXY_TEST_DATABASE_TYPE" = "sqlite" ];
then
export GALAXY_TEST_DBURI="sqlite:////opt/galaxy/galaxy.sqlite"
else
echo "Unknown database type"
exit 1
fi
cd /galaxy
GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION="$GALAXY_TEST_DBURI" sh manage_db.sh upgrade
sh run_tests.sh $@