From e603edaf20f7d5cf18bb82d24ede25acd8922a3c Mon Sep 17 00:00:00 2001 From: Jesse Brown Date: Thu, 27 Aug 2020 15:32:28 -0500 Subject: [PATCH] Make fake image match SetLabel behavior Signed-off-by: Jesse Brown --- fakes/image.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fakes/image.go b/fakes/image.go index 9520a9af..40cffd44 100644 --- a/fakes/image.go +++ b/fakes/image.go @@ -101,6 +101,9 @@ func (i *Image) Rebase(baseTopLayer string, newBase imgutil.Image) error { } func (i *Image) SetLabel(k string, v string) error { + if i.labels == nil { + i.labels = map[string]string{} + } i.labels[k] = v return nil }