mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
Adds scopeUID config to enable multiple instances of Watchtower (#511)
* Adds scopeUID config to enable multiple instances of Watchtower * Adds tests for multiple instance support with scopeuid * Adds docs on scope monitoring and multiple instance support * Adds multiple instances docs to mkdocs config file * Changes multiple instances check and refactors naming for scope feature * Applies linter suggestions * Fixes documentation on Watchtower monitoring scope
This commit is contained in:
parent
5efb249a86
commit
6a18ee911e
14 changed files with 160 additions and 24 deletions
|
@ -46,7 +46,7 @@ var _ = Describe("the actions package", func() {
|
|||
When("given an empty array", func() {
|
||||
It("should not do anything", func() {
|
||||
client.TestData.Containers = []container.Container{}
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false)
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false, "")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
@ -59,7 +59,7 @@ var _ = Describe("the actions package", func() {
|
|||
"watchtower",
|
||||
time.Now()),
|
||||
}
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false)
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false, "")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
@ -90,7 +90,7 @@ var _ = Describe("the actions package", func() {
|
|||
})
|
||||
|
||||
It("should stop all but the latest one", func() {
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false)
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false, "")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
@ -120,12 +120,12 @@ var _ = Describe("the actions package", func() {
|
|||
)
|
||||
})
|
||||
It("should try to delete the image if the cleanup flag is true", func() {
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, true)
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, true, "")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(client.TestData.TriedToRemoveImage()).To(BeTrue())
|
||||
})
|
||||
It("should not try to delete the image if the cleanup flag is false", func() {
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false)
|
||||
err := actions.CheckForMultipleWatchtowerInstances(client, false, "")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(client.TestData.TriedToRemoveImage()).To(BeFalse())
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue