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:
Sebastiaan van Stijn
2025-07-27 18:17:07 +02:00
committed by Rob Murray
parent d06f0d008d
commit ee4b7a8374
6 changed files with 8 additions and 14 deletions

View File

@@ -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)