diff --git a/components/engine/integration/internal/container/ops.go b/components/engine/integration/internal/container/ops.go index b2d170b4df..b26ef104da 100644 --- a/components/engine/integration/internal/container/ops.go +++ b/components/engine/integration/internal/container/ops.go @@ -120,18 +120,12 @@ func WithIPv6(network, ip string) func(*TestContainerConfig) { // WithLogDriver sets the log driver to use for the container func WithLogDriver(driver string) func(*TestContainerConfig) { return func(c *TestContainerConfig) { - if c.HostConfig == nil { - c.HostConfig = &containertypes.HostConfig{} - } c.HostConfig.LogConfig.Type = driver } } // WithAutoRemove sets the container to be removed on exit func WithAutoRemove(c *TestContainerConfig) { - if c.HostConfig == nil { - c.HostConfig = &containertypes.HostConfig{} - } c.HostConfig.AutoRemove = true }