Skip to content

Commit

Permalink
Refine chart tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sd109 committed Oct 29, 2024
1 parent 9a099be commit ae52dc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion chart/templates/test/end-to-end.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.api.enabled -}}
{{- if and .Values.ui.enabled .Values.api.enabled -}}
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -15,7 +15,11 @@ spec:
command:
- python
- gradio-client-test.py
{{- if .Values.ingress.ui.enabled }}
- {{ .Values.ingress.host }}{{ .Values.ingress.ui.path }}
{{- else }}
- http://{{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc
{{- end }}
restartPolicy: Never
# Allow plenty of retries since downloading
# model weights can take a long time.
Expand Down
6 changes: 5 additions & 1 deletion chart/templates/test/web-app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.api.enabled -}}
{{- if and .Values.ui.enabled (not .Values.api.enabled) -}}
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -15,7 +15,11 @@ spec:
command:
- nc
- -vz
{{- if .Values.ingress.ui.enabled }}
- {{ .Values.ingress.host | trimPrefix 'http://' | trimPrefix 'https://' }}{{ .Values.ingress.ui.path }}
{{- else }}
- {{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc
{{- end }}
- "80"
restartPolicy: Never
backoffLimit: 3
Expand Down

0 comments on commit ae52dc9

Please sign in to comment.