-
Notifications
You must be signed in to change notification settings - Fork 187
/
_build-and-test-all.sh
executable file
·49 lines (29 loc) · 1.09 KB
/
_build-and-test-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/bash
set -e
docker="./gradlew ${DATABASE}${MODE}${BROKER}Compose"
if [ -z "$TEST_DB_ID" ] ; then
./gradlew $* testClasses
${docker}Down -P removeContainers=true
${docker}Up
./gradlew cleanTest build
if [[ "${DATABASE}" == "mysql" ]] && [[ "${BROKER}" == "kafka" ]]; then
${docker}Down -P removeContainers=true
${docker}Up
export EVENTUATE_DATABASE_SCHEMA=custom
${docker}Up
export TEST_CUSTOM_DB=true
./gradlew cleanTest :eventuate-tram-db-broker-integration-test:test --tests "io.eventuate.tram.broker.db.integrationtests.TramIntegrationCustomDBTest"
./gradlew cleanTest :eventuate-tram-commands-db-broker-integration-test:test --tests "io.eventuate.tram.commands.db.broker.integrationtests.TramCommandsDBBrokerIntegrationCustomDBTest"
fi
else
echo ==== TESTING DB_ID
./gradlew $* testClasses
${docker}Down -P removeContainers=true
export USE_DB_ID=true
export EVENTUATE_OUTBOX_ID=1
unset TEST_CUSTOM_DB
unset EVENTUATE_DATABASE_SCHEMA
${docker}Up
./gradlew cleanTest build
fi
${docker}Down -P removeContainers=true