From 558cde3b54dfdc8eec41fbccbbfb7c8c95bc9856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nils=20m=C3=A5s=C3=A9n?= Date: Sun, 12 Mar 2023 10:01:44 +0100 Subject: [PATCH] add test for invalid value --- pkg/container/container_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/container/container_test.go b/pkg/container/container_test.go index 736387d..46cf658 100644 --- a/pkg/container/container_test.go +++ b/pkg/container/container_test.go @@ -224,6 +224,14 @@ var _ = Describe("the container", func() { Expect(c.IsNoPull()).To(Equal(false)) }) }) + When("no-pull label is set to an invalid value", func() { + c := MockContainer(WithLabels(map[string]string{ + "com.centurylinklabs.watchtower.no-pull": "maybe", + })) + It("should return false", func() { + Expect(c.IsNoPull()).To(Equal(false)) + }) + }) When("no-pull label is unset", func() { c = MockContainer(WithLabels(map[string]string{})) It("should return false", func() {