Skip to content

Commit

Permalink
test(scripts): add a section to run integration tests against mysql d…
Browse files Browse the repository at this point in the history
…atabase containers
  • Loading branch information
danvergara committed Apr 5, 2021
1 parent 73f2c6e commit 345fc80
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export PGUSER="postgres"
export DBPASSWORD="password"
export DATABASE="users"
export PGPORT="15432"
export MYSQL_PORT="13306"

# Test different versions of postgres available on Docker Hub.
pgversions="9.6 10.16 11.11 12.6 13.2"
Expand All @@ -26,3 +27,19 @@ do
make test
echo "--------------END POSTGRES TESTS-------------"
done


# Test different versions of mysql available on Docker Hub.
mysql_versions="5.6 5.7 8.0"

for i in $mysql_versions
do
MYSQL_VERSION="$i"
echo "--------------BEGIN MYSQL TESTS-------------"
echo "Running test against MySQL v$MYSQL_VERSION"
docker rm -f mysql || true
docker run -p $MYSQL_PORT:3306 --name mysql -e MYSQL_PASSWORD=$DBPASSWORD -d mysql:$MYSQL_VERSION
sleep 5
make test
echo "--------------END MYSQL TESTS-------------"
done

0 comments on commit 345fc80

Please sign in to comment.