(t *testing.T)
| 148 | } |
| 149 | |
| 150 | func TestContainerListWithoutFormat(t *testing.T) { |
| 151 | cli := test.NewFakeCli(&fakeClient{ |
| 152 | containerListFunc: func(_ client.ContainerListOptions) (client.ContainerListResult, error) { |
| 153 | return client.ContainerListResult{ |
| 154 | Items: []container.Summary{ |
| 155 | *builders.Container("c1"), |
| 156 | *builders.Container("c2", builders.WithName("foo")), |
| 157 | *builders.Container("c3", builders.WithPort(80, 80, builders.TCP), builders.WithPort(81, 81, builders.TCP), builders.WithPort(82, 82, builders.TCP)), |
| 158 | *builders.Container("c4", builders.WithPort(81, 81, builders.UDP)), |
| 159 | *builders.Container("c5", builders.WithPort(82, 82, builders.IP("8.8.8.8"), builders.TCP)), |
| 160 | }, |
| 161 | }, nil |
| 162 | }, |
| 163 | }) |
| 164 | cmd := newListCommand(cli) |
| 165 | cmd.SetArgs([]string{}) |
| 166 | cmd.SetOut(io.Discard) |
| 167 | cmd.SetErr(io.Discard) |
| 168 | assert.NilError(t, cmd.Execute()) |
| 169 | golden.Assert(t, cli.OutBuffer().String(), "container-list-without-format.golden") |
| 170 | } |
| 171 | |
| 172 | func TestContainerListNoTrunc(t *testing.T) { |
| 173 | cli := test.NewFakeCli(&fakeClient{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…