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

Function TestList

cli/command/context/list_test.go:31–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestList(t *testing.T) {
32 cli := makeFakeCli(t)
33 createTestContexts(t, cli, "current", "other", "unset")
34 cli.SetCurrentContext("current")
35 cli.OutBuffer().Reset()
36 assert.NilError(t, runList(cli, &listOptions{}))
37 golden.Assert(t, cli.OutBuffer().String(), "list.golden")
38}
39
40func TestListJSON(t *testing.T) {
41 cli := makeFakeCli(t)

Callers

nothing calls this directly

Calls 6

makeFakeCliFunction · 0.85
createTestContextsFunction · 0.85
SetCurrentContextMethod · 0.80
runListFunction · 0.70
StringMethod · 0.65
OutBufferMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…