mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon/container: remove NewState() constructor
This constructor did not do anything other than creating an empty struct for an exported type. While we should look at initializing with a proper state, we currently do not, so let's not pretend we do some magic here, and leave it for a future exercise to create a proper constructor if we need one. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
committed by
Rob Murray
parent
d06f0d008d
commit
ee4b7a8374
@@ -1029,7 +1029,7 @@ func (d *Daemon) TamperWithContainerConfig(t testing.TB, containerID string, tam
|
||||
assert.NilError(t, json.Unmarshal(configBytes, &c))
|
||||
assert.NilError(t, json.Unmarshal(hostConfigBytes, &c.HostConfig))
|
||||
|
||||
c.State = container.NewState()
|
||||
c.State = &container.State{}
|
||||
tamper(&c)
|
||||
|
||||
configBytes, err = json.Marshal(&c)
|
||||
|
||||
Reference in New Issue
Block a user