remove obsolete mutli-orchestrator support
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
@ -74,7 +74,7 @@ func TestStackServicesErrors(t *testing.T) {
|
||||
nodeListFunc: tc.nodeListFunc,
|
||||
taskListFunc: tc.taskListFunc,
|
||||
})
|
||||
cmd := newServicesCommand(cli, &orchestrator)
|
||||
cmd := newServicesCommand(cli)
|
||||
cmd.SetArgs(tc.args)
|
||||
for key, value := range tc.flags {
|
||||
cmd.Flags().Set(key, value)
|
||||
@ -86,7 +86,7 @@ func TestStackServicesErrors(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRunServicesWithEmptyName(t *testing.T) {
|
||||
cmd := newServicesCommand(test.NewFakeCli(&fakeClient{}), &orchestrator)
|
||||
cmd := newServicesCommand(test.NewFakeCli(&fakeClient{}))
|
||||
cmd.SetArgs([]string{"' '"})
|
||||
cmd.SetOut(ioutil.Discard)
|
||||
|
||||
@ -99,7 +99,7 @@ func TestStackServicesEmptyServiceList(t *testing.T) {
|
||||
return []swarm.Service{}, nil
|
||||
},
|
||||
})
|
||||
cmd := newServicesCommand(fakeCli, &orchestrator)
|
||||
cmd := newServicesCommand(fakeCli)
|
||||
cmd.SetArgs([]string{"foo"})
|
||||
assert.NilError(t, cmd.Execute())
|
||||
assert.Check(t, is.Equal("", fakeCli.OutBuffer().String()))
|
||||
@ -112,7 +112,7 @@ func TestStackServicesWithQuietOption(t *testing.T) {
|
||||
return []swarm.Service{*Service(ServiceID("id-foo"))}, nil
|
||||
},
|
||||
})
|
||||
cmd := newServicesCommand(cli, &orchestrator)
|
||||
cmd := newServicesCommand(cli)
|
||||
cmd.Flags().Set("quiet", "true")
|
||||
cmd.SetArgs([]string{"foo"})
|
||||
assert.NilError(t, cmd.Execute())
|
||||
@ -127,7 +127,7 @@ func TestStackServicesWithFormat(t *testing.T) {
|
||||
}, nil
|
||||
},
|
||||
})
|
||||
cmd := newServicesCommand(cli, &orchestrator)
|
||||
cmd := newServicesCommand(cli)
|
||||
cmd.SetArgs([]string{"foo"})
|
||||
cmd.Flags().Set("format", "{{ .Name }}")
|
||||
assert.NilError(t, cmd.Execute())
|
||||
@ -145,7 +145,7 @@ func TestStackServicesWithConfigFormat(t *testing.T) {
|
||||
cli.SetConfigFile(&configfile.ConfigFile{
|
||||
ServicesFormat: "{{ .Name }}",
|
||||
})
|
||||
cmd := newServicesCommand(cli, &orchestrator)
|
||||
cmd := newServicesCommand(cli)
|
||||
cmd.SetArgs([]string{"foo"})
|
||||
assert.NilError(t, cmd.Execute())
|
||||
golden.Assert(t, cli.OutBuffer().String(), "stack-services-with-config-format.golden")
|
||||
@ -168,7 +168,7 @@ func TestStackServicesWithoutFormat(t *testing.T) {
|
||||
)}, nil
|
||||
},
|
||||
})
|
||||
cmd := newServicesCommand(cli, &orchestrator)
|
||||
cmd := newServicesCommand(cli)
|
||||
cmd.SetArgs([]string{"foo"})
|
||||
assert.NilError(t, cmd.Execute())
|
||||
golden.Assert(t, cli.OutBuffer().String(), "stack-services-without-format.golden")
|
||||
|
||||
Reference in New Issue
Block a user