| 57 | } |
| 58 | |
| 59 | func 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 | |
| 75 | func TestTaskPrintWithNoTruncOption(t *testing.T) { |
| 76 | const quiet = false |