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

Function TestRemoveNotAContext

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

Source from the content-addressed store, hash-verified

22}
23
24func TestRemoveNotAContext(t *testing.T) {
25 cli := makeFakeCli(t)
26 createTestContexts(t, cli, "current", "other")
27 err := runRemove(cli, removeOptions{}, []string{"not-a-context"})
28 assert.ErrorContains(t, err, `context "not-a-context" does not exist`)
29
30 err = runRemove(cli, removeOptions{force: true}, []string{"not-a-context"})
31 assert.NilError(t, err)
32}
33
34func TestRemoveCurrent(t *testing.T) {
35 cli := makeFakeCli(t)

Callers

nothing calls this directly

Calls 3

makeFakeCliFunction · 0.85
createTestContextsFunction · 0.85
runRemoveFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…