Print 'kubectl apply' output during e2e tests

Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
James Munnelly 2019-10-11 11:05:26 +01:00
parent 4ec682db20
commit 0472ac4f09
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,7 @@ go_library(
"//test/e2e/framework/addon/chart:go_default_library",
"//test/e2e/framework/addon/tiller:go_default_library",
"//test/e2e/framework/config:go_default_library",
"//test/e2e/framework/log:go_default_library",
],
)

View File

@ -23,6 +23,7 @@ import (
"github.com/jetstack/cert-manager/test/e2e/framework/addon/chart"
"github.com/jetstack/cert-manager/test/e2e/framework/addon/tiller"
"github.com/jetstack/cert-manager/test/e2e/framework/config"
"github.com/jetstack/cert-manager/test/e2e/framework/log"
)
// Certmanager defines an addon that installs an instance of certmanager in the
@ -95,7 +96,10 @@ func (p *Certmanager) Setup(cfg *config.Config) error {
// Provision will actually deploy this instance of Pebble-ingress to the cluster.
func (p *Certmanager) Provision() error {
if err := exec.Command(p.config.Kubectl, "apply", "--validate=false", "-f", p.config.RepoRoot+"/deploy/manifests/00-crds.yaml").Run(); err != nil {
cmd := exec.Command(p.config.Kubectl, "apply", "--validate=false", "-f", p.config.RepoRoot+"/deploy/manifests/00-crds.yaml")
cmd.Stdout = log.Writer
cmd.Stderr = log.Writer
if err := cmd.Run(); err != nil {
return fmt.Errorf("error install cert-manager CRD manifests: %v", err)
}