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

Function TestTaskPrintWithQuietOption

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

Source from the content-addressed store, hash-verified

57}
58
59func TestTaskPrintWithQuietOption(t *testing.T) {
60 const quiet = true
61 const trunc = false
62 const noResolve = true
63 apiClient := &fakeClient{}
64 cli := test.NewFakeCli(apiClient)
65 tasks := client.TaskListResult{
66 Items: []swarm.Task{
67 *builders.Task(builders.TaskID("id-foo")),
68 },
69 }
70 err := Print(context.Background(), cli, tasks, idresolver.New(apiClient, noResolve), trunc, quiet, formatter.TableFormatKey)
71 assert.NilError(t, err)
72 golden.Assert(t, cli.OutBuffer().String(), "task-print-with-quiet-option.golden")
73}
74
75func TestTaskPrintWithNoTruncOption(t *testing.T) {
76 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…