Skip to content

Commit 6a7a637

Browse files
fix(tests): correct syntax for all tests
1 parent 17e14e8 commit 6a7a637

File tree

11 files changed

+33
-11
lines changed

11 files changed

+33
-11
lines changed

charts/supabase/templates/test/analytics.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
- -c
2121
- |
2222
curl -sfo /dev/null \
23-
http://{{ include "supabase.analytics.fullname" . }}:{{ .Values.analytics.service.port }}/health
23+
http://{{ include "supabase.analytics.fullname" . }}:{{ .Values.analytics.service.port }}/health \
24+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.analytics.fullname" . }}."; exit 1; }
25+
2426
echo "Sevice {{ include "supabase.analytics.fullname" . }} is healthy."
2527
restartPolicy: Never
2628
{{- end }}

charts/supabase/templates/test/auth.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
- -c
2121
- |
2222
curl -sfo /dev/null \
23-
http://{{ include "supabase.auth.fullname" . }}:{{ .Values.auth.service.port }}/health
23+
http://{{ include "supabase.auth.fullname" . }}:{{ .Values.auth.service.port }}/health \
24+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.auth.fullname" . }}."; exit 1; }
25+
2426
echo "Sevice {{ include "supabase.auth.fullname" . }} is healthy."
2527
restartPolicy: Never
2628
{{- end }}

charts/supabase/templates/test/db.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ spec:
1616
- /bin/sh
1717
- -c
1818
- |
19-
pg_isready -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) || $(echo "\e[0;31mFailed to connect to the database." && exit 1)
19+
pg_isready -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) \
20+
|| { echo -e "\033[31mFailed to connect to the database."; exit 1; }
21+
2022
echo "Database is ready"
2123
env:
24+
# no password?
2225
- name: DB_HOST
2326
{{- if .Values.db.enabled }}
2427
value: {{ include "supabase.db.fullname" . | quote }}

charts/supabase/templates/test/imgproxy.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
- -c
2121
- |
2222
curl -sfo /dev/null \
23-
http://{{ include "supabase.imgproxy.fullname" . }}:{{ .Values.imgproxy.service.port }}/health
23+
http://{{ include "supabase.imgproxy.fullname" . }}:{{ .Values.imgproxy.service.port }}/health \
24+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.imgproxy.fullname" . }}."; exit 1; }
25+
2426
echo "Sevice {{ include "supabase.imgproxy.fullname" . }} is healthy."
2527
restartPolicy: Never
2628
{{- end }}

charts/supabase/templates/test/kong.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ spec:
3434
curl -sL --fail \
3535
-o /dev/null \
3636
"http://${DASHBOARD_USERNAME}:${DASHBOARD_PASSWORD}@{{ include "supabase.kong.fullname" . }}:{{ .Values.kong.service.port }}" \
37-
|| ( echo -e "\e[0;31mFailed to get a valid response." && exit 1 )
37+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.kong.fullname" . }}."; exit 1; }
38+
3839
echo "Successfully connected."
3940
restartPolicy: Never
4041
{{- end }}

charts/supabase/templates/test/meta.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
- -c
2121
- |
2222
curl -sfo /dev/null \
23-
http://{{ include "supabase.meta.fullname" . }}:{{ .Values.meta.service.port }}/health
23+
http://{{ include "supabase.meta.fullname" . }}:{{ .Values.meta.service.port }}/health \
24+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.meta.fullname" . }}."; exit 1; }
25+
2426
echo "Sevice {{ include "supabase.meta.fullname" . }} is healthy."
2527
restartPolicy: Never
2628
{{- end }}

charts/supabase/templates/test/minio.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ spec:
1919
- -c
2020
- |
2121
curl -sfo /dev/null \
22-
http://{{ include "supabase.minio.fullname" . }}:{{ .Values.minio.service.port }}/minio/health/live
22+
http://{{ include "supabase.minio.fullname" . }}:{{ .Values.minio.service.port }}/minio/health/live \
23+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.minio.fullname" . }}."; exit 1; }
24+
2325
echo "Sevice {{ include "supabase.minio.fullname" . }} is healthy."
2426
restartPolicy: Never
2527
{{- end }}

charts/supabase/templates/test/realtime.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
- -c
2121
- |
2222
curl -sfo /dev/null \
23-
http://{{ include "supabase.realtime.fullname" . }}:{{ .Values.realtime.service.port }}
23+
http://{{ include "supabase.realtime.fullname" . }}:{{ .Values.realtime.service.port }} \
24+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.realtime.fullname" . }}."; exit 1; }
25+
2426
echo "Sevice {{ include "supabase.realtime.fullname" . }} is healthy."
2527
restartPolicy: Never
2628
{{- end }}

charts/supabase/templates/test/rest.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
- -c
2121
- |
2222
curl -sfo /dev/null \
23-
http://{{ include "supabase.rest.fullname" . }}:{{ .Values.rest.service.port }}
23+
http://{{ include "supabase.rest.fullname" . }}:{{ .Values.rest.service.port }} \
24+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.rest.fullname" . }}."; exit 1; }
25+
2426
echo "Sevice {{ include "supabase.rest.fullname" . }} is healthy."
2527
restartPolicy: Never
2628
{{- end }}

charts/supabase/templates/test/storage.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
- -c
2121
- |
2222
curl -sfo /dev/null \
23-
http://{{ include "supabase.storage.fullname" . }}:{{ .Values.storage.service.port }}/status
23+
http://{{ include "supabase.storage.fullname" . }}:{{ .Values.storage.service.port }}/status \
24+
|| { echo -e "\033[31mFailed to connect to the {{ include "supabase.storage.fullname" . }}."; exit 1; }
25+
2426
echo "Sevice {{ include "supabase.storage.fullname" . }} is healthy."
2527
restartPolicy: Never
2628
{{- end }}

0 commit comments

Comments
 (0)