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

Function TestTaskPrintWithReplicatedService

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

Source from the content-addressed store, hash-verified

105}
106
107func TestTaskPrintWithReplicatedService(t *testing.T) {
108 const quiet = false
109 const trunc = false
110 const noResolve = true
111 apiClient := &fakeClient{}
112 cli := test.NewFakeCli(apiClient)
113 tasks := client.TaskListResult{
114 Items: []swarm.Task{
115 *builders.Task(builders.TaskServiceID("service-id-foo"), builders.TaskSlot(1)),
116 },
117 }
118 err := Print(context.Background(), cli, tasks, idresolver.New(apiClient, noResolve), trunc, quiet, "{{ .Name }}")
119 assert.NilError(t, err)
120 golden.Assert(t, cli.OutBuffer().String(), "task-print-with-replicated-service.golden")
121}
122
123func TestTaskPrintWithIndentation(t *testing.T) {
124 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…