Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): correct syntax for all tests #96

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/analytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.analytics.fullname" . }}:{{ .Values.analytics.service.port }}/health
http://{{ include "supabase.analytics.fullname" . }}:{{ .Values.analytics.service.port }}/health \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.analytics.fullname" . }}\033[0m."; exit 1; }

echo "Sevice {{ include "supabase.analytics.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.auth.fullname" . }}:{{ .Values.auth.service.port }}/health
http://{{ include "supabase.auth.fullname" . }}:{{ .Values.auth.service.port }}/health \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.auth.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.auth.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
5 changes: 4 additions & 1 deletion charts/supabase/templates/test/db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ spec:
- /bin/sh
- -c
- |
pg_isready -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) || $(echo "\e[0;31mFailed to connect to the database." && exit 1)
pg_isready -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) \
|| { echo -e "\033[31mFailed to connect to the database.\033[0m"; exit 1; }

echo "Database is ready"
env:
# no password?
- name: DB_HOST
{{- if .Values.db.enabled }}
value: {{ include "supabase.db.fullname" . | quote }}
Expand Down
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/imgproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.imgproxy.fullname" . }}:{{ .Values.imgproxy.service.port }}/health
http://{{ include "supabase.imgproxy.fullname" . }}:{{ .Values.imgproxy.service.port }}/health \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.imgproxy.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.imgproxy.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
3 changes: 2 additions & 1 deletion charts/supabase/templates/test/kong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ spec:
curl -sL --fail \
-o /dev/null \
"http://${DASHBOARD_USERNAME}:${DASHBOARD_PASSWORD}@{{ include "supabase.kong.fullname" . }}:{{ .Values.kong.service.port }}" \
|| ( echo -e "\e[0;31mFailed to get a valid response." && exit 1 )
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.kong.fullname" . }}.\033[0m"; exit 1; }

echo "Successfully connected."
restartPolicy: Never
{{- end }}
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.meta.fullname" . }}:{{ .Values.meta.service.port }}/health
http://{{ include "supabase.meta.fullname" . }}:{{ .Values.meta.service.port }}/health \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.meta.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.meta.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.minio.fullname" . }}:{{ .Values.minio.service.port }}/minio/health/live
http://{{ include "supabase.minio.fullname" . }}:{{ .Values.minio.service.port }}/minio/health/live \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.minio.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.minio.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/realtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.realtime.fullname" . }}:{{ .Values.realtime.service.port }}
http://{{ include "supabase.realtime.fullname" . }}:{{ .Values.realtime.service.port }} \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.realtime.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.realtime.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.rest.fullname" . }}:{{ .Values.rest.service.port }}
http://{{ include "supabase.rest.fullname" . }}:{{ .Values.rest.service.port }} \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.rest.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.rest.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.storage.fullname" . }}:{{ .Values.storage.service.port }}/status
http://{{ include "supabase.storage.fullname" . }}:{{ .Values.storage.service.port }}/status \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.storage.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.storage.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}
4 changes: 3 additions & 1 deletion charts/supabase/templates/test/studio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- -c
- |
curl -sfo /dev/null \
http://{{ include "supabase.studio.fullname" . }}:{{ .Values.studio.service.port }}/api/profile
http://{{ include "supabase.studio.fullname" . }}:{{ .Values.studio.service.port }}/api/profile \
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.studio.fullname" . }}.\033[0m"; exit 1; }

echo "Sevice {{ include "supabase.studio.fullname" . }} is healthy."
restartPolicy: Never
{{- end }}