Skip to content

Commit ae52dc9

Browse files
committed
Refine chart tests
1 parent 9a099be commit ae52dc9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

chart/templates/test/end-to-end.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.api.enabled -}}
1+
{{- if and .Values.ui.enabled .Values.api.enabled -}}
22
apiVersion: batch/v1
33
kind: Job
44
metadata:
@@ -15,7 +15,11 @@ spec:
1515
command:
1616
- python
1717
- gradio-client-test.py
18+
{{- if .Values.ingress.ui.enabled }}
19+
- {{ .Values.ingress.host }}{{ .Values.ingress.ui.path }}
20+
{{- else }}
1821
- http://{{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc
22+
{{- end }}
1923
restartPolicy: Never
2024
# Allow plenty of retries since downloading
2125
# model weights can take a long time.

chart/templates/test/web-app.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if not .Values.api.enabled -}}
1+
{{- if and .Values.ui.enabled (not .Values.api.enabled) -}}
22
apiVersion: batch/v1
33
kind: Job
44
metadata:
@@ -15,7 +15,11 @@ spec:
1515
command:
1616
- nc
1717
- -vz
18+
{{- if .Values.ingress.ui.enabled }}
19+
- {{ .Values.ingress.host | trimPrefix 'http://' | trimPrefix 'https://' }}{{ .Values.ingress.ui.path }}
20+
{{- else }}
1821
- {{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc
22+
{{- end }}
1923
- "80"
2024
restartPolicy: Never
2125
backoffLimit: 3

0 commit comments

Comments
 (0)