mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
add docs and tests for no-pull label
This commit is contained in:
parent
75cc6b8c65
commit
fb8dd3b04e
2 changed files with 28 additions and 0 deletions
|
|
@ -234,6 +234,9 @@ Environment Variable: WATCHTOWER_NO_PULL
|
|||
Default: false
|
||||
```
|
||||
|
||||
Note that no-pull can also be specified on a per-container basis with the
|
||||
`com.centurylinklabs.watchtower.no-pull` label set on those containers.
|
||||
|
||||
## Without sending a startup message
|
||||
Do not send a message after watchtower started. Otherwise there will be an info-level notification.
|
||||
|
||||
|
|
|
|||
|
|
@ -207,6 +207,31 @@ var _ = Describe("the container", func() {
|
|||
})
|
||||
})
|
||||
|
||||
When("checking no-pull label", func() {
|
||||
When("no-pull label is true", func() {
|
||||
c := MockContainer(WithLabels(map[string]string{
|
||||
"com.centurylinklabs.watchtower.no-pull": "true",
|
||||
}))
|
||||
It("should return true", func() {
|
||||
Expect(c.IsNoPull()).To(Equal(true))
|
||||
})
|
||||
})
|
||||
When("no-pull label is false", func() {
|
||||
c := MockContainer(WithLabels(map[string]string{
|
||||
"com.centurylinklabs.watchtower.no-pull": "false",
|
||||
}))
|
||||
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() {
|
||||
Expect(c.IsNoPull()).To(Equal(false))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
When("there is a pre or post update timeout", func() {
|
||||
It("should return minute values", func() {
|
||||
c = MockContainer(WithLabels(map[string]string{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue