From 9659d7a8ac16ecdfb1a89036279a8b78fac021f7 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 14 Feb 2019 16:10:15 -0800 Subject: [PATCH] integration/internal/container/ops: rm unused code Since container.Create() already initializes HostConfig to be non-nil, there is no need for this code. Remove it. Signed-off-by: Kir Kolyshkin (cherry picked from commit 17022b3ad2d95863e5acd17ebaf943b7761623cc) Signed-off-by: Sebastiaan van Stijn Upstream-commit: ed48a92a580b7ccc5c5837c7d802f787000146eb Component: engine --- components/engine/integration/internal/container/ops.go | 6 ------ 1 file changed, 6 deletions(-) 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 }