From ecaaaa8792a90e37f29714c4f8ee1aff844e689c Mon Sep 17 00:00:00 2001 From: Admin Bot Date: Mon, 28 Sep 2026 14:18:32 +0700 Subject: [PATCH] fix(test): update TestPromote_KustomizeSuccess for new kustomize patch path Patch now targets /spec/sources/0/kustomize (full block) not /spec/sources/0/kustomize/images (subpath that fails when kustomize key is absent from the Application CR). --- internal/webhook/promoter_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/webhook/promoter_test.go b/internal/webhook/promoter_test.go index 946ad95..d7668af 100644 --- a/internal/webhook/promoter_test.go +++ b/internal/webhook/promoter_test.go @@ -260,9 +260,12 @@ func TestPromote_KustomizeSuccess(t *testing.T) { case http.MethodPatch: atomic.AddInt32(&patchCalled, 1) raw, _ := readAll(r.Body) - if !strings.Contains(string(raw), "/spec/sources/0/kustomize/images") { + if !strings.Contains(string(raw), `"/spec/sources/0/kustomize"`) { t.Errorf("patch path missing: %s", raw) } + if !strings.Contains(string(raw), `"images"`) { + t.Errorf("images key missing from kustomize block: %s", raw) + } if !strings.Contains(string(raw), "@sha256:newdigest") { t.Errorf("digest missing from patch body: %s", raw) }