mirror of
https://github.com/containrrr/watchtower.git
synced 2026-03-06 04:40:16 +01:00
Merge branch 'main' into fix-container-downtime
This commit is contained in:
commit
24276cfbc6
85 changed files with 3816 additions and 1098 deletions
|
|
@ -62,7 +62,7 @@ var _ = Describe("the update action", func() {
|
|||
When("there are multiple containers using the same image", func() {
|
||||
It("should only try to remove the image once", func() {
|
||||
|
||||
err := actions.Update(client, types.UpdateParams{Cleanup: true})
|
||||
_, err := actions.Update(client, types.UpdateParams{Cleanup: true})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(client.TestData.TriedToRemoveImageCount).To(Equal(1))
|
||||
})
|
||||
|
|
@ -80,7 +80,7 @@ var _ = Describe("the update action", func() {
|
|||
nil,
|
||||
),
|
||||
)
|
||||
err := actions.Update(client, types.UpdateParams{Cleanup: true})
|
||||
_, err := actions.Update(client, types.UpdateParams{Cleanup: true})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(client.TestData.TriedToRemoveImageCount).To(Equal(2))
|
||||
})
|
||||
|
|
@ -230,6 +230,14 @@ var _ = Describe("the update action", func() {
|
|||
Expect(client.TestData.RestartOrder).To(Equal(ExpectedRestartOutput))
|
||||
})
|
||||
})
|
||||
When("performing a rolling restart update", func() {
|
||||
It("should try to remove the image once", func() {
|
||||
|
||||
_, err := actions.Update(client, types.UpdateParams{Cleanup: true, RollingRestart: true})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(client.TestData.TriedToRemoveImageCount).To(Equal(1))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
When("watchtower has been instructed to monitor only", func() {
|
||||
|
|
@ -264,7 +272,7 @@ var _ = Describe("the update action", func() {
|
|||
})
|
||||
|
||||
It("should not update those containers", func() {
|
||||
err := actions.Update(client, types.UpdateParams{Cleanup: true})
|
||||
_, err := actions.Update(client, types.UpdateParams{Cleanup: true})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(client.TestData.TriedToRemoveImageCount).To(Equal(1))
|
||||
})
|
||||
|
|
@ -296,7 +304,7 @@ var _ = Describe("the update action", func() {
|
|||
})
|
||||
|
||||
It("should not update any containers", func() {
|
||||
err := actions.Update(client, types.UpdateParams{MonitorOnly: true})
|
||||
_, err := actions.Update(client, types.UpdateParams{MonitorOnly: true})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(client.TestData.TriedToRemoveImageCount).To(Equal(0))
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue