mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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 <kolyshkin@gmail.com>
This commit is contained in:
parent
39eaf1ef97
commit
17022b3ad2
1 changed files with 0 additions and 6 deletions
|
@ -128,17 +128,11 @@ func WithIPv6(network, ip string) func(*TestContainerConfig) {
|
||||||
// WithLogDriver sets the log driver to use for the container
|
// WithLogDriver sets the log driver to use for the container
|
||||||
func WithLogDriver(driver string) func(*TestContainerConfig) {
|
func WithLogDriver(driver string) func(*TestContainerConfig) {
|
||||||
return func(c *TestContainerConfig) {
|
return func(c *TestContainerConfig) {
|
||||||
if c.HostConfig == nil {
|
|
||||||
c.HostConfig = &containertypes.HostConfig{}
|
|
||||||
}
|
|
||||||
c.HostConfig.LogConfig.Type = driver
|
c.HostConfig.LogConfig.Type = driver
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithAutoRemove sets the container to be removed on exit
|
// WithAutoRemove sets the container to be removed on exit
|
||||||
func WithAutoRemove(c *TestContainerConfig) {
|
func WithAutoRemove(c *TestContainerConfig) {
|
||||||
if c.HostConfig == nil {
|
|
||||||
c.HostConfig = &containertypes.HostConfig{}
|
|
||||||
}
|
|
||||||
c.HostConfig.AutoRemove = true
|
c.HostConfig.AutoRemove = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue