Merge pull request 'fix(test): update TestPromote_KustomizeSuccess for kustomize patch path' (#57) from fix/promoter-test-kustomize-path into main
CI / CI (push) Successful in 3m26s
CI / CI (push) Successful in 3m26s
This commit was merged in pull request #57.
This commit is contained in:
@@ -260,9 +260,12 @@ func TestPromote_KustomizeSuccess(t *testing.T) {
|
|||||||
case http.MethodPatch:
|
case http.MethodPatch:
|
||||||
atomic.AddInt32(&patchCalled, 1)
|
atomic.AddInt32(&patchCalled, 1)
|
||||||
raw, _ := readAll(r.Body)
|
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)
|
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") {
|
if !strings.Contains(string(raw), "@sha256:newdigest") {
|
||||||
t.Errorf("digest missing from patch body: %s", raw)
|
t.Errorf("digest missing from patch body: %s", raw)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user