MCPcopy Index your code
hub / github.com/docker/cli / TestStackServicesWithQuietOption

Function TestStackServicesWithQuietOption

cli/command/stack/services_test.go:86–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func TestStackServicesWithQuietOption(t *testing.T) {
87 cli := test.NewFakeCli(&fakeClient{
88 serviceListFunc: func(options client.ServiceListOptions) (client.ServiceListResult, error) {
89 return client.ServiceListResult{
90 Items: []swarm.Service{*builders.Service(builders.ServiceID("id-foo"))},
91 }, nil
92 },
93 })
94 cmd := newServicesCommand(cli)
95 assert.Check(t, cmd.Flags().Set("quiet", "true"))
96 cmd.SetArgs([]string{"foo"})
97 assert.NilError(t, cmd.Execute())
98 golden.Assert(t, cli.OutBuffer().String(), "stack-services-with-quiet-option.golden")
99}
100
101func TestStackServicesWithFormat(t *testing.T) {
102 cli := test.NewFakeCli(&fakeClient{

Callers

nothing calls this directly

Calls 5

OutBufferMethod · 0.95
newServicesCommandFunction · 0.85
SetArgsMethod · 0.80
StringMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…