Merge pull request #1141 from adshmh/fix-output-leak-from-TestRunCommandWithContentTrustErrors

fixed output leak from TestRunCommandWithContentTrustErrors
This commit is contained in:
Vincent Demeester 2018-06-24 09:20:56 +02:00 committed by GitHub
commit 1c20e3f601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package container
import (
"fmt"
"io/ioutil"
"testing"
"github.com/docker/cli/internal/test"
@ -66,6 +67,7 @@ func TestRunCommandWithContentTrustErrors(t *testing.T) {
cli.SetNotaryClient(tc.notaryFunc)
cmd := NewRunCommand(cli)
cmd.SetArgs(tc.args)
cmd.SetOutput(ioutil.Discard)
err := cmd.Execute()
assert.Assert(t, err != nil)
assert.Assert(t, is.Contains(cli.ErrBuffer().String(), tc.expectedError))