test-configmap.yaml 505 B

1234567891011121314151617
  1. {{- if .Values.testFramework.enabled }}
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: {{ template "grafana.fullname" . }}-test
  6. namespace: {{ template "grafana.namespace" . }}
  7. labels:
  8. {{- include "grafana.labels" . | nindent 4 }}
  9. data:
  10. run.sh: |-
  11. @test "Test Health" {
  12. url="http://{{ template "grafana.fullname" . }}/api/health"
  13. code=$(wget --server-response --spider --timeout 10 --tries 1 ${url} 2>&1 | awk '/^ HTTP/{print $2}')
  14. [ "$code" == "200" ]
  15. }
  16. {{- end }}