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

Function TestTaskPrintWithNoTruncOption

cli/command/task/print_test.go:75–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestTaskPrintWithNoTruncOption(t *testing.T) {
76 const quiet = false
77 const trunc = false
78 const noResolve = true
79 apiClient := &fakeClient{}
80 cli := test.NewFakeCli(apiClient)
81 tasks := client.TaskListResult{
82 Items: []swarm.Task{
83 *builders.Task(builders.TaskID("id-foo-yov6omdek8fg3k5stosyp2m50")),
84 },
85 }
86 err := Print(context.Background(), cli, tasks, idresolver.New(apiClient, noResolve), trunc, quiet, "{{ .ID }}")
87 assert.NilError(t, err)
88 golden.Assert(t, cli.OutBuffer().String(), "task-print-with-no-trunc-option.golden")
89}
90
91func TestTaskPrintWithGlobalService(t *testing.T) {
92 const quiet = false

Callers

nothing calls this directly

Calls 3

OutBufferMethod · 0.95
PrintFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…