mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
fix: add missing portmap when needed (#1183)
This commit is contained in:
parent
a1bdd268c1
commit
04db93c770
2 changed files with 22 additions and 19 deletions
|
|
@ -50,11 +50,13 @@ var _ = Describe("the container", func() {
|
|||
})
|
||||
})
|
||||
When("verifying a container with port bindings, but no exposed ports", func() {
|
||||
It("should return an error", func() {
|
||||
It("should make the config compatible with updating", func() {
|
||||
c := mockContainerWithPortBindings("80/tcp")
|
||||
c.containerInfo.Config.ExposedPorts = nil
|
||||
err := c.VerifyConfiguration()
|
||||
Expect(err).To(Equal(errorNoExposedPorts))
|
||||
Expect(c.VerifyConfiguration()).To(Succeed())
|
||||
|
||||
Expect(c.containerInfo.Config.ExposedPorts).ToNot(BeNil())
|
||||
Expect(c.containerInfo.Config.ExposedPorts).To(BeEmpty())
|
||||
})
|
||||
})
|
||||
When("verifying a container with port bindings and exposed ports is non-nil", func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue