diff --git a/integration/service/create_test.go b/integration/service/create_test.go index 43da879566..b2a0b58a7c 100644 --- a/integration/service/create_test.go +++ b/integration/service/create_test.go @@ -33,7 +33,7 @@ func testServiceCreateInit(daemonEnabled bool) func(t *testing.T) { var ops = []daemon.Option{} if daemonEnabled { - ops = append(ops, daemon.WithInit) + ops = append(ops, daemon.WithInit()) } d := swarm.NewSwarm(t, testEnv, ops...) defer d.Stop(t) diff --git a/testutil/daemon/ops.go b/testutil/daemon/ops.go index 425ce23c78..e45eeafeae 100644 --- a/testutil/daemon/ops.go +++ b/testutil/daemon/ops.go @@ -31,8 +31,10 @@ func WithExperimental() Option { } // WithInit sets the daemon init -func WithInit(d *Daemon) { - d.init = true +func WithInit() Option { + return func(d *Daemon) { + d.init = true + } } // WithDockerdBinary sets the dockerd binary to the specified one