use loadgenerator in smoketest
This commit is contained in:
parent
21c7455f73
commit
ae89359798
1 changed files with 10 additions and 6 deletions
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
@ -42,12 +42,16 @@ jobs:
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
RESULT=" "
|
# start fresh loadgenerator pod
|
||||||
while [[ "$RESULT" != " HTTP/1.1 200 OK" ]]; do
|
kubectl delete pod -l app=loadgenerator
|
||||||
sleep 1
|
# wait for requests to come in
|
||||||
RESULT=$(kubectl exec deployments/frontend -- sh -c "wget --spider -S "http://frontend" 2>&1 | grep 'HTTP/'")
|
REQUEST_COUNT="0"
|
||||||
echo "front end response: $RESULT"
|
while [[ "$REQUEST_COUNT" -lt "50" ]]; do
|
||||||
|
sleep 5
|
||||||
|
REQUEST_COUNT=$(kubectl logs -l app=loadgenerator | grep Total | awk '{print $2}')
|
||||||
done
|
done
|
||||||
if [[ "$RESULT" != " HTTP/1.1 200 OK" ]]; then
|
# ensure there are no errors hitting endpoints
|
||||||
|
ERROR_COUNT=$(kubectl logs -l app=loadgenerator | grep Total | awk '{print $3}' | sed "s/[(][^)]*[)]//g")
|
||||||
|
if [[ "$ERROR_COUNT" -gt "0" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue