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

Function fakeClientForRemoveStackTest

cli/command/stack/remove_test.go:15–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13)
14
15func fakeClientForRemoveStackTest() *fakeClient {
16 allServices := []string{
17 objectName("foo", "service1"),
18 objectName("foo", "service2"),
19 objectName("bar", "service1"),
20 objectName("bar", "service2"),
21 }
22 allNetworks := []string{
23 objectName("foo", "network1"),
24 objectName("bar", "network1"),
25 }
26 allSecrets := []string{
27 objectName("foo", "secret1"),
28 objectName("foo", "secret2"),
29 objectName("bar", "secret1"),
30 }
31 allConfigs := []string{
32 objectName("foo", "config1"),
33 objectName("foo", "config2"),
34 objectName("bar", "config1"),
35 }
36 return &fakeClient{
37 services: allServices,
38 networks: allNetworks,
39 secrets: allSecrets,
40 configs: allConfigs,
41 }
42}
43
44func TestRemoveWithEmptyName(t *testing.T) {
45 cmd := newRemoveCommand(test.NewFakeCli(&fakeClient{}))

Callers 1

Calls 1

objectNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…