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:
Daniel Nephin
2017-07-05 14:19:52 -04:00
parent 6908e58f0f
commit 69b142b52a
53 changed files with 182 additions and 168 deletions

View File

@ -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)