apiVersion: v1
kind: Pod
metadata:
  name: "{{ .Release.Name }}-dashboard-test"
  annotations:
    "helm.sh/hook": test-success
spec:
  containers:
    - name: {{ .Release.Name }}-dashboard-test
      image: {{ template "kubeapps.image" (list .Values.testImage .Values.global) }}
      env:
        - name: DASHBOARD_HOST
          value: {{ template "kubeapps.fullname" . }}.{{ .Release.Namespace }}
      command:
        - sh
        - -c
        - curl -o /tmp/output $DASHBOARD_HOST && cat /tmp/output && cat /tmp/output | grep 'You need to enable JavaScript to run this app'
  restartPolicy: Never
