| 73 | } |
| 74 | |
| 75 | func 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 | |
| 91 | func TestTaskPrintWithGlobalService(t *testing.T) { |
| 92 | const quiet = false |