simplifies run-tests.sh and will make it easier to spin up other testing databases in the future.
27 lines
765 B
Bash
Executable file
27 lines
765 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# start databases with: docker-compose up
|
|
# then: ./run-tests.sh create
|
|
# - creates a new database in MySQL for running tests
|
|
#
|
|
# test against "all" databases with MySQL JDBC driver:
|
|
# ./run-tests.sh
|
|
#
|
|
# test against "all" databases with MariaDB JDBC driver:
|
|
# ./run-tests.sh maria
|
|
|
|
if test "$1" = "create"
|
|
then
|
|
# assumes you already have a MySQL instance running locally
|
|
NEXT_JDBC_TEST_MYSQL=yes clojure -X:test next.jdbc.test-fixtures/create-clojure-test
|
|
fi
|
|
if test "$1" = "maria"
|
|
then
|
|
NEXT_JDBC_TEST_MSSQL=yes MSSQL_SA_PASSWORD=Str0ngP4ssw0rd \
|
|
NEXT_JDBC_TEST_MYSQL=yes NEXT_JDBC_TEST_MARIADB=yes clojure -X:test
|
|
fi
|
|
if test "$1" = ""
|
|
then
|
|
NEXT_JDBC_TEST_MSSQL=yes MSSQL_SA_PASSWORD=Str0ngP4ssw0rd \
|
|
NEXT_JDBC_TEST_MYSQL=yes clojure -X:test
|
|
fi
|