diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18e48f0780f3afd8a7643bb829db86850db02eca..bee455a79988797d0ccc09e68ff2b18d89fc2ef3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,6 +84,7 @@ test-helm: - cd helm - helm dependencies update . - helm install theodolite . -f preconfigs/minimal.yaml --wait + - helm test theodolite - kubectl get nodes -o wide - kubectl get pods --all-namespaces -o wide - kubectl get services --all-namespaces -o wide diff --git a/helm/templates/tests/test-connection.yaml b/helm/templates/tests/test-prometheus-connection.yaml similarity index 73% rename from helm/templates/tests/test-connection.yaml rename to helm/templates/tests/test-prometheus-connection.yaml index 7af87e98920c11bcfaccb27724e6f29fc76771a0..313a0825adf5d654642c6e1d8ff6beb4ee59df97 100644 --- a/helm/templates/tests/test-connection.yaml +++ b/helm/templates/tests/test-prometheus-connection.yaml @@ -1,3 +1,4 @@ +{{- if .Values.prometheus.enabled }} apiVersion: v1 kind: Pod metadata: @@ -5,7 +6,8 @@ metadata: labels: {{- include "theodolite.labels" . | nindent 4 }} annotations: - "helm.sh/hook": test-success + "helm.sh/hook": test + "helm.sh/hook-delete-policy": hook-succeeded spec: containers: - name: wget @@ -13,3 +15,4 @@ spec: command: ['wget'] args: ['http://prometheus-operated:9090'] restartPolicy: Never +{{- end }}