testutil: update WithInitsignature to be a daemon.Option

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-09-30 14:44:09 +02:00
parent 554d9cec25
commit f60d6ee4bc
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 5 additions and 3 deletions

View file

@ -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)

View file

@ -31,9 +31,11 @@ func WithExperimental() Option {
}
// WithInit sets the daemon init
func WithInit(d *Daemon) {
func WithInit() Option {
return func(d *Daemon) {
d.init = true
}
}
// WithDockerdBinary sets the dockerd binary to the specified one
func WithDockerdBinary(dockerdBinary string) Option {