mirror of
https://github.com/helm/helm.git
synced 2026-03-01 13:01:50 -05:00
fix(helm): fix the output leak to stdout during build by tests under pkg/releasetesting,
by redirecting output from mock clients. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
This commit is contained in:
parent
a77f38da91
commit
4fcf69bc52
2 changed files with 7 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"k8s.io/helm/pkg/proto/hapi/release"
|
||||
|
|
@ -145,7 +145,7 @@ type getFailingKubeClient struct {
|
|||
|
||||
func newGetFailingKubeClient() *getFailingKubeClient {
|
||||
return &getFailingKubeClient{
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: os.Stdout},
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: ioutil.Discard},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ type deleteFailingKubeClient struct {
|
|||
|
||||
func newDeleteFailingKubeClient() *deleteFailingKubeClient {
|
||||
return &deleteFailingKubeClient{
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: os.Stdout},
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: ioutil.Discard},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ type createFailingKubeClient struct {
|
|||
|
||||
func newCreateFailingKubeClient() *createFailingKubeClient {
|
||||
return &createFailingKubeClient{
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: os.Stdout},
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: ioutil.Discard},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ package releasetesting
|
|||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ type podSucceededKubeClient struct {
|
|||
|
||||
func newPodSucceededKubeClient() *podSucceededKubeClient {
|
||||
return &podSucceededKubeClient{
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: os.Stdout},
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: ioutil.Discard},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ type podFailedKubeClient struct {
|
|||
|
||||
func newPodFailedKubeClient() *podFailedKubeClient {
|
||||
return &podFailedKubeClient{
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: os.Stdout},
|
||||
PrintingKubeClient: tillerEnv.PrintingKubeClient{Out: ioutil.Discard},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue