File tree Expand file tree Collapse file tree 4 files changed +36
-13
lines changed
Expand file tree Collapse file tree 4 files changed +36
-13
lines changed Original file line number Diff line number Diff line change @@ -53,18 +53,11 @@ jobs:
5353 shell : devenv shell bash -- -e {0}
5454 run : |
5555 cd src/load-generator
56- bash scripts/run-docker.sh -n app_default -t 'http://ui:8080' -d 30 -o /tmp/test.json
57-
58- result=$(jq '.aggregate.counters."vusers.failed" == 0' /tmp/test.json)
59-
60- if [ "$result" = "false" ]; then
61- echo "Check failed: vusers.failed is not 0"
62- exit 1
63- fi
56+ bash scripts/run-test.sh
6457 - name : Compose down
6558 shell : devenv shell bash -- -e {0}
6659 run : |
67- DB_PASSWORD='test123' yarn nx compose:up
60+ DB_PASSWORD='test123' yarn nx compose:down
6861
6962 kubernetes :
7063 name : Kubernetes E2E Tests
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ A convenience script is provided to make it easier to run the load generator on
1111Run the following command for usage instructions:
1212
1313``` bash
14- bash scripts/run.sh --help
14+ bash scripts/run-docker .sh --help
1515```
1616
1717### Kubernetes
4040 mountPath: /scripts
4141 initContainers:
4242 - name: setup
43- image: public.ecr.aws/aws-containers/retail-store-sample-utils:load-gen.0.3.0
43+ image: public.ecr.aws/aws-containers/retail-store-sample-utils:load-gen.1.2.1 <!-- x-release-please-version -->
4444 command:
4545 - bash
4646 args:
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ scenarios:
3535 streetAddress : 100 Main Street
3636 city : Anytown
3737 state : CA
38- zip : 11111
38+ zipCode : 11111
3939 - post :
4040 url : " /checkout/delivery"
4141 form :
4242 token : priority-mail
4343 - post :
44- url : " /checkout/confirm "
44+ url : " /checkout/payment "
4545 form :
4646 cardHolder : John Doe
4747 cardNumber : " 1234567890123456"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ script_dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd -P)
6+
7+ outfile=$( mktemp)
8+
9+ bash $script_dir /run-docker.sh -n app_default -t ' http://ui:8080' -d 30 -o $outfile
10+
11+ result=$( jq ' .aggregate.counters."vusers.failed" == 0' $outfile )
12+
13+ if [ " $result " = " false" ]; then
14+ echo " Check failed: vusers.failed is not 0"
15+ exit 1
16+ fi
17+
18+ result_200=$( jq ' (.aggregate.counters."http.codes.200" // 0) > 0' $outfile )
19+
20+ if [ " $result_200 " = " false" ]; then
21+ echo " Check failed: http.codes.200 is 0"
22+ exit 1
23+ fi
24+
25+ result_404=$( jq ' (.aggregate.counters."http.codes.404" // 0) == 0' $outfile )
26+
27+ if [ " $result_404 " = " false" ]; then
28+ echo " Check failed: http.codes.404 is not 0"
29+ exit 1
30+ fi
You can’t perform that action at this time.
0 commit comments