-
Notifications
You must be signed in to change notification settings - Fork 3
/
run-tests.sh
executable file
·64 lines (50 loc) · 1.03 KB
/
run-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
#!/bin/bash
set -e
usage=" USAGE: ./$(basename $0) [-h] [-d DELAY] [-c COUNT]
Execute the orderdata-ts helper dapr app locally with processing done in AKS using Azure ServiceBus
OPTIONS:
-h show this help text
-c <CYCLES> number of cycles
-s <SUFFIX> case suffix rs or ts (default : ts)
EXAMPLE: run 5 cycles
./$(basename $0) -d 5"
CYCLES=10
SUFFIX=ts
while getopts ":hc:s:" option; do
case $option in
h)
echo "${usage}"
exit
;;
c)
CYCLES=$OPTARG
;;
s)
SUFFIX=$OPTARG
;;
esac
done
apps=($(for d in ./samples/*dapr-$SUFFIX ; do echo ${d##*/}; done))
for app in "${apps[@]}"
do
echo "build $app"
pushd ./samples/$app
./build.sh
popd
done
for app in "${apps[@]}"
do
echo "deploy and test $app"
pushd ./samples/$app
./deploy.sh shared
popd
pushd ./helpers/orderdata-ts
for i in $(seq 1 $CYCLES);
do
./run-cluster.sh $app
done
popd
pushd ./samples/$app
./destroy.sh shared
popd
done