Add possibility to check response code in auth test
This PS allows to check the response code and if it's equal to 22, the test will be considered as successful. Change-Id: I3867c551be5785488248e956e6f8a124477232f5
This commit is contained in:
parent
e44ad39421
commit
b2e69ed678
@ -24,7 +24,7 @@ kind: Pod
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-auth-test"
|
||||
annotations:
|
||||
helm.sh/hook: "test-failure"
|
||||
helm.sh/hook: "test-success"
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
||||
labels:
|
||||
{{ tuple $envAll "drydock" "auth-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
@ -38,6 +38,6 @@ spec:
|
||||
image: {{ .Values.images.tags.drydock }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple . .Values.pod.resources.test | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
|
||||
command: ["/bin/bash", "-c", "curl -v -X GET --fail ${DRYDOCK_URL}/api/v1.0/tasks; exit $?"]
|
||||
command: ["/bin/bash", "-c", 'curl -v -X GET --fail ${DRYDOCK_URL}/api/v1.0/tasks; exit_code=$?; if [ "$exit_code" = "22" ]; then exit 0; fi; exit 1']
|
||||
...
|
||||
{{- end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user