add test for invalid value

This commit is contained in:
nils måsén 2023-03-12 10:01:44 +01:00 committed by GitHub
parent fb8dd3b04e
commit 558cde3b54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {