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

Function TestRemoveStackRemovesEverything

cli/command/stack/remove_test.go:53–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestRemoveStackRemovesEverything(t *testing.T) {
54 apiClient := fakeClientForRemoveStackTest()
55 cmd := newRemoveCommand(test.NewFakeCli(apiClient))
56 cmd.SetArgs([]string{"foo", "bar"})
57
58 assert.NilError(t, cmd.Execute())
59 assert.Check(t, is.DeepEqual(buildObjectIDs(apiClient.services), apiClient.removedServices))
60 assert.Check(t, is.DeepEqual(buildObjectIDs(apiClient.networks), apiClient.removedNetworks))
61 assert.Check(t, is.DeepEqual(buildObjectIDs(apiClient.secrets), apiClient.removedSecrets))
62 assert.Check(t, is.DeepEqual(buildObjectIDs(apiClient.configs), apiClient.removedConfigs))
63}
64
65func TestRemoveStackSkipEmpty(t *testing.T) {
66 allServices := []string{objectName("bar", "service1"), objectName("bar", "service2")}

Callers

nothing calls this directly

Calls 4

buildObjectIDsFunction · 0.85
SetArgsMethod · 0.80
newRemoveCommandFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…