Add bats tests to load tester artifacts

This commit is contained in:
stefanprodan
2019-04-18 14:34:25 +03:00
parent 4a82e1e223
commit 662f9cba2e
2 changed files with 27 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: flagger-loadtester-bats
data:
tests: |
#!/usr/bin/env bats
@test "check message" {
curl -sS http://${URL} | jq -r .message | {
run cut -d $' ' -f1
[ $output = "greetings" ]
}
}
@test "check headers" {
curl -sS http://${URL}/headers | grep X-Request-Id
}
+8
View File
@@ -57,3 +57,11 @@ spec:
securityContext:
readOnlyRootFilesystem: true
runAsUser: 10001
volumeMounts:
- name: tests
mountPath: /bats
readOnly: true
volumes:
- name: tests
configMap:
name: flagger-loadtester-bats