Update FakeCli to remove duplication in tests.
Use byte buffers by default, since that is what is done most of the time. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
@ -18,7 +18,7 @@ func TestPruneServices(t *testing.T) {
|
||||
"keep": {},
|
||||
}
|
||||
client := &fakeClient{services: []string{objectName("foo", "keep"), objectName("foo", "remove")}}
|
||||
dockerCli := test.NewFakeCli(client, &bytes.Buffer{})
|
||||
dockerCli := test.NewFakeCliWithOutput(client, &bytes.Buffer{})
|
||||
dockerCli.SetErr(&bytes.Buffer{})
|
||||
|
||||
pruneServices(ctx, dockerCli, namespace, services)
|
||||
|
||||
Reference in New Issue
Block a user