mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-31 06:08:49 +01:00
Consolidated all post-fork updates including dependency bumps and workflow changes
This commit is contained in:
parent
2abaa47fd3
commit
6b62d53797
100 changed files with 1503 additions and 1264 deletions
|
|
@ -21,7 +21,8 @@ func MockContainer(updates ...MockContainerUpdate) *Container {
|
|||
},
|
||||
}
|
||||
image := types.ImageInspect{
|
||||
ID: "image_id",
|
||||
ID: "image_id",
|
||||
Config: &dockerContainer.Config{},
|
||||
}
|
||||
|
||||
for _, update := range updates {
|
||||
|
|
@ -64,3 +65,15 @@ func WithContainerState(state types.ContainerState) MockContainerUpdate {
|
|||
cnt.State = &state
|
||||
}
|
||||
}
|
||||
|
||||
func WithHealthcheck(healthConfig dockerContainer.HealthConfig) MockContainerUpdate {
|
||||
return func(cnt *types.ContainerJSON, img *types.ImageInspect) {
|
||||
cnt.Config.Healthcheck = &healthConfig
|
||||
}
|
||||
}
|
||||
|
||||
func WithImageHealthcheck(healthConfig dockerContainer.HealthConfig) MockContainerUpdate {
|
||||
return func(cnt *types.ContainerJSON, img *types.ImageInspect) {
|
||||
img.Config.Healthcheck = &healthConfig
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue