Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -33,7 +33,7 @@ func testServiceCreateInit(daemonEnabled bool) func(t *testing.T) {
|
| 33 | 33 |
var ops = []daemon.Option{}
|
| 34 | 34 |
|
| 35 | 35 |
if daemonEnabled {
|
| 36 |
- ops = append(ops, daemon.WithInit) |
|
| 36 |
+ ops = append(ops, daemon.WithInit()) |
|
| 37 | 37 |
} |
| 38 | 38 |
d := swarm.NewSwarm(t, testEnv, ops...) |
| 39 | 39 |
defer d.Stop(t) |
| ... | ... |
@@ -31,8 +31,10 @@ func WithExperimental() Option {
|
| 31 | 31 |
} |
| 32 | 32 |
|
| 33 | 33 |
// WithInit sets the daemon init |
| 34 |
-func WithInit(d *Daemon) {
|
|
| 35 |
- d.init = true |
|
| 34 |
+func WithInit() Option {
|
|
| 35 |
+ return func(d *Daemon) {
|
|
| 36 |
+ d.init = true |
|
| 37 |
+ } |
|
| 36 | 38 |
} |
| 37 | 39 |
|
| 38 | 40 |
// WithDockerdBinary sets the dockerd binary to the specified one |