-
Notifications
You must be signed in to change notification settings - Fork 24
/
local-k8s-acceptance-tests.sh
executable file
·72 lines (69 loc) · 1.94 KB
/
local-k8s-acceptance-tests.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
if [ "$1" = "-h" ]; then
echo "Usage $0 <test>"
echo " where test:"
echo " n for test-n-of-3"
echo " info for test-info with aboutTestInfo"
echo " smoke for smoke tests"
echo " groupX for test-groups using provided"
echo " otherwise the profile will be test-all with -Dtest and the parameter"
exit 0
fi
SCDIR=$(realpath $(dirname "$(readlink -f "${BASH_SOURCE[0]}")"))
ROOTDIR=$(realpath $SCDIR)
pushd "$ROOTDIR/acceptance-tests/custom-apps/timestamp-batch-with-drivers-template1" > /dev/null
./gradlew build install
popd > /dev/null # This assumes you are using minikube with helm from bitnami and used release name scdf and executed forward-scdf.sh
if [ "$DATAFLOW_IP" = "" ]; then
echo "DATAFLOW_IP not defined"
exit 1
fi
if [ "$EXTRA" = "" ]; then
export EXTRA="-P test-all"
fi
if [ "$1" != "" ]; then
case $1 in
1)
export EXTRA="-P test-1-of-3"
;;
2)
export EXTRA="-P test-2-of-3"
;;
3)
export EXTRA="-P test-3-of-3"
;;
"smoke")
export EXTRA="-Dgroups=smoke,always"
;;
info)
export EXTRA="-P test-info -Dit.test=\"*DataFlowAT#aboutTestInfo\""
;;
*)
if [[ "$1" == *"group"* ]]; then
export EXTRA="-Dgroups=$*"
else
export EXTRA="-Dit.test=$*"
fi
esac
fi
if [ "$BROKER" = "kafka" ]; then
export BINDER=kafka
else
export BINDER=rabbit
fi
echo "DATAFLOW_IP=$DATAFLOW_IP"
pushd "$ROOTDIR" || exit $?
echo "EXTRA=$EXTRA" | tee build.log
echo "ROOTDIR=$ROOTDIR" | tee -a build.log
echo "PWD=$(pwd)" | tee -a build.log
set -o pipefail
./mvnw -Dspring.profiles.active=blah,spring \
-DPLATFORM_TYPE=kubernetes \
-DNAMESPACE=$NS \
-DSKIP_CLOUD_CONFIG=true \
-DBINDER=$BINDER \
-Dtest.docker.compose.disable.extension=true \
-Dspring.cloud.dataflow.client.serverUri=$DATAFLOW_IP \
-Dspring.cloud.dataflow.client.skipSslValidation=true \
clean integration-test "$EXTRA" | tee -a build.log | grep -v -F "DEBUG"
popd