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

Function TestStackServicesEmptyServiceList

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

Source from the content-addressed store, hash-verified

71}
72
73func TestStackServicesEmptyServiceList(t *testing.T) {
74 fakeCli := test.NewFakeCli(&fakeClient{
75 serviceListFunc: func(options client.ServiceListOptions) (client.ServiceListResult, error) {
76 return client.ServiceListResult{}, nil
77 },
78 })
79 cmd := newServicesCommand(fakeCli)
80 cmd.SetArgs([]string{"foo"})
81 assert.NilError(t, cmd.Execute())
82 assert.Check(t, is.Equal("", fakeCli.OutBuffer().String()))
83 assert.Check(t, is.Equal("Nothing found in stack: foo\n", fakeCli.ErrBuffer().String()))
84}
85
86func TestStackServicesWithQuietOption(t *testing.T) {
87 cli := test.NewFakeCli(&fakeClient{

Callers

nothing calls this directly

Calls 5

OutBufferMethod · 0.95
ErrBufferMethod · 0.95
newServicesCommandFunction · 0.85
SetArgsMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…