feat: check container config before update (#925)

* feat: check container config before restart
* fix: only skip when hostconfig and config differ
* fix: update test mocks to not fail tests
* test: add verify config tests
This commit is contained in:
nils måsén 2021-04-24 18:29:05 +02:00 committed by GitHub
parent fdf6e46e7b
commit 12467712a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 151 additions and 13 deletions

View file

@ -16,10 +16,13 @@ func CreateMockContainer(id string, name string, image string, created time.Time
Image: image,
Name: name,
Created: created.String(),
HostConfig: &container2.HostConfig{
PortBindings: map[nat.Port][]nat.PortBinding{},
},
},
Config: &container2.Config{
Image: image,
Labels: make(map[string]string),
Image: image,
Labels: make(map[string]string),
ExposedPorts: map[nat.Port]struct{}{},
},
}