Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@@ -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)
@@ -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