mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
Support for --cleanup flag
The --cleanup flag will cause watchtower to automatically remove the old image after a container is restart with a new image.
This commit is contained in:
parent
b8ba80df2d
commit
dd80aa4a0d
10 changed files with 117 additions and 7 deletions
|
@ -23,6 +23,16 @@ func TestName(t *testing.T) {
|
|||
assert.Equal(t, "foo", c.Name())
|
||||
}
|
||||
|
||||
func TestImageID(t *testing.T) {
|
||||
c := Container{
|
||||
imageInfo: &dockerclient.ImageInfo{
|
||||
Id: "foo",
|
||||
},
|
||||
}
|
||||
|
||||
assert.Equal(t, "foo", c.ImageID())
|
||||
}
|
||||
|
||||
func TestImageName_Tagged(t *testing.T) {
|
||||
c := Container{
|
||||
containerInfo: &dockerclient.ContainerInfo{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue