From df93b0d1c555eec411790d394924831cb61434fa Mon Sep 17 00:00:00 2001 From: chrisfu Date: Mon, 13 Apr 2026 21:48:56 -0700 Subject: [PATCH] chore: update NOTES.txt to use `studioIngress` and add test for validation --- supabase/helm/knoe-supabase/templates/NOTES.txt | 2 +- tests/test_render_supabase_hostname.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/supabase/helm/knoe-supabase/templates/NOTES.txt b/supabase/helm/knoe-supabase/templates/NOTES.txt index 8a94b91..306c280 100644 --- a/supabase/helm/knoe-supabase/templates/NOTES.txt +++ b/supabase/helm/knoe-supabase/templates/NOTES.txt @@ -1,5 +1,5 @@ --- Thank you for installing {{ .Chart.Name }}! {{ if .Values.ingress.enabled }} -Visit the Studio dashboard at https://{{ (index .Values.ingress.hosts 0).host }} +Visit the Studio dashboard at https://{{ (index .Values.studioIngress.hosts 0).host }} {{- end }} diff --git a/tests/test_render_supabase_hostname.py b/tests/test_render_supabase_hostname.py index 2e21acd..f4b0fbb 100644 --- a/tests/test_render_supabase_hostname.py +++ b/tests/test_render_supabase_hostname.py @@ -6,6 +6,7 @@ from pathlib import Path REPO_ROOT = Path(__file__).resolve().parents[1] _RENDER_PATH = REPO_ROOT / "supabase" / "helm" / "render_supabase.py" +_NOTES_TEMPLATE_PATH = REPO_ROOT / "supabase" / "helm" / "knoe-supabase" / "templates" / "NOTES.txt" def _load_render_module(): @@ -168,6 +169,16 @@ def test_render_supabase_derives_env_indexed_api_host_for_k8s(tmp_path: Path, mo ) +def test_supabase_notes_template_uses_studio_ingress_host(): + notes_template = _NOTES_TEMPLATE_PATH.read_text(encoding="utf-8") + + assert ( + "Visit the Studio dashboard at https://{{ (index .Values.studioIngress.hosts 0).host }}" + in notes_template + ) + assert "(index .Values.ingress.hosts 0).host" not in notes_template + + def test_render_supabase_rejects_duplicate_api_and_studio_host_claims(tmp_path: Path, monkeypatch): monkeypatch.delenv("SUPABASE_HOST", raising=False) monkeypatch.delenv("SUPABASE_HOSTNAME", raising=False)