#!/bin/bash MYSQL_CONTAINER=icingaweb2_director_mysql echo "Starting MySQL container..." docker run -d \ -e MYSQL_ROOT_PASSWORD=onlyforadmin \ -e MYSQL_DATABASE=icingaweb2 \ -e MYSQL_USER=icingaweb2 \ -e MYSQL_PASSWORD=rosebud \ --name "$MYSQL_CONTAINER" \ mariadb >/dev/null echo "Running tests..." docker run --rm -i \ --link "$MYSQL_CONTAINER":mysql \ -v `pwd`:/app \ -e DIRECTOR_TESTDB_RES="Director MySQL TestDB" \ -e DIRECTOR_TESTDB_HOST="mysql" \ -e DIRECTOR_TESTDB_USER="icingaweb2" \ -e DIRECTOR_TESTDB_PASSWORD="rosebud" \ -e DIRECTOR_TESTDB="icingaweb2" \ lazyfrosch/icingaweb2-test:5.6 \ sh - \ <