Merge pull request #3535 from adshmh/fix-output-leak-from-pkg-tiller-tests

fix the output leak from test code under pkg/tiller
pull/3437/merge
Matthew Fisher 7 years ago committed by GitHub
commit 1a9e0f0d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,6 +19,7 @@ package tiller
import ( import (
"errors" "errors"
"io" "io"
"io/ioutil"
"os" "os"
"regexp" "regexp"
"testing" "testing"
@ -284,7 +285,7 @@ func releaseWithKeepStub(rlsName string) *release.Release {
func MockEnvironment() *environment.Environment { func MockEnvironment() *environment.Environment {
e := environment.New() e := environment.New()
e.Releases = storage.Init(driver.NewMemory()) e.Releases = storage.Init(driver.NewMemory())
e.KubeClient = &environment.PrintingKubeClient{Out: os.Stdout} e.KubeClient = &environment.PrintingKubeClient{Out: ioutil.Discard}
return e return e
} }
@ -305,7 +306,7 @@ func (u *updateFailingKubeClient) Update(namespace string, originalReader, modif
func newHookFailingKubeClient() *hookFailingKubeClient { func newHookFailingKubeClient() *hookFailingKubeClient {
return &hookFailingKubeClient{ return &hookFailingKubeClient{
PrintingKubeClient: environment.PrintingKubeClient{Out: os.Stdout}, PrintingKubeClient: environment.PrintingKubeClient{Out: ioutil.Discard},
} }
} }

Loading…
Cancel
Save