|
|
|
@ -124,6 +124,36 @@ var _ = Describe("the container", func() {
|
|
|
|
|
}))
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
When("container healthcheck config is empty", func() {
|
|
|
|
|
It("should not panic", func() {
|
|
|
|
|
c := MockContainer(WithImageHealthcheck(dc.HealthConfig{
|
|
|
|
|
Test: []string{"/usr/bin/sleep", "10s"},
|
|
|
|
|
Interval: 10,
|
|
|
|
|
Timeout: 60,
|
|
|
|
|
StartPeriod: 30,
|
|
|
|
|
Retries: 10,
|
|
|
|
|
}))
|
|
|
|
|
Expect(c.GetCreateConfig().Healthcheck).To(BeNil())
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
When("container image healthcheck config is empty", func() {
|
|
|
|
|
It("should not panic", func() {
|
|
|
|
|
c := MockContainer(WithHealthcheck(dc.HealthConfig{
|
|
|
|
|
Test: []string{"/usr/bin/sleep", "1s"},
|
|
|
|
|
Interval: 30,
|
|
|
|
|
Timeout: 30,
|
|
|
|
|
StartPeriod: 10,
|
|
|
|
|
Retries: 2,
|
|
|
|
|
}))
|
|
|
|
|
Expect(c.GetCreateConfig().Healthcheck).To(Equal(&dc.HealthConfig{
|
|
|
|
|
Test: []string{"/usr/bin/sleep", "1s"},
|
|
|
|
|
Interval: 30,
|
|
|
|
|
Timeout: 30,
|
|
|
|
|
StartPeriod: 10,
|
|
|
|
|
Retries: 2,
|
|
|
|
|
}))
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
When("asked for metadata", func() {
|
|
|
|
|
var c *Container
|
|
|
|
|