From f60d6ee4bc742ff12ff295507e73d24407b64fba Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 30 Sep 2019 14:44:09 +0200 Subject: [PATCH] testutil: update WithInitsignature to be a daemon.Option Signed-off-by: Sebastiaan van Stijn --- integration/service/create_test.go | 2 +- testutil/daemon/ops.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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