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

Function TestRemove

cli/command/context/remove_test.go:14–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestRemove(t *testing.T) {
15 cli := makeFakeCli(t)
16 createTestContexts(t, cli, "current", "other")
17 assert.NilError(t, runRemove(cli, removeOptions{}, []string{"other"}))
18 _, err := cli.ContextStore().GetMetadata("current")
19 assert.NilError(t, err)
20 _, err = cli.ContextStore().GetMetadata("other")
21 assert.Check(t, is.ErrorType(err, errdefs.IsNotFound))
22}
23
24func TestRemoveNotAContext(t *testing.T) {
25 cli := makeFakeCli(t)

Callers

nothing calls this directly

Calls 5

makeFakeCliFunction · 0.85
createTestContextsFunction · 0.85
runRemoveFunction · 0.70
GetMetadataMethod · 0.65
ContextStoreMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…