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

Function TestStackServicesWithoutFormat

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

Source from the content-addressed store, hash-verified

131}
132
133func TestStackServicesWithoutFormat(t *testing.T) {
134 cli := test.NewFakeCli(&fakeClient{
135 serviceListFunc: func(options client.ServiceListOptions) (client.ServiceListResult, error) {
136 return client.ServiceListResult{
137 Items: []swarm.Service{*builders.Service(
138 builders.ServiceName("name-foo"),
139 builders.ServiceID("id-foo"),
140 builders.ReplicatedService(2),
141 builders.ServiceImage("busybox:latest"),
142 builders.ServicePort(swarm.PortConfig{
143 PublishMode: swarm.PortConfigPublishModeIngress,
144 PublishedPort: 0,
145 TargetPort: 3232,
146 Protocol: network.TCP,
147 }),
148 )},
149 }, nil
150 },
151 })
152 cmd := newServicesCommand(cli)
153 cmd.SetArgs([]string{"foo"})
154 assert.NilError(t, cmd.Execute())
155 golden.Assert(t, cli.OutBuffer().String(), "stack-services-without-format.golden")
156}

Callers

nothing calls this directly

Calls 4

OutBufferMethod · 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…