diff --git a/cmd/helm/deployment_test.go b/cmd/helm/deployment_test.go index 1882f04ca..dd1f149cc 100644 --- a/cmd/helm/deployment_test.go +++ b/cmd/helm/deployment_test.go @@ -43,7 +43,8 @@ func TestDeployment(t *testing.T) { &common.Deployment{ Name: "guestbook.yaml", State: &common.DeploymentState{ - common.FailedStatus, []string{"error message"}, + Status: common.FailedStatus, + Errors: []string{"error message"}, }, }, "Name: guestbook.yaml\nStatus: Failed\nErrors:\n error message\n", diff --git a/pkg/chart/chart_test.go b/pkg/chart/chart_test.go index b4f93a2b9..6aea61033 100644 --- a/pkg/chart/chart_test.go +++ b/pkg/chart/chart_test.go @@ -187,7 +187,7 @@ func TestLoadTemplates(t *testing.T) { } if len(members) != len(files) { - t.Fatalf("Expected %s templates, got %d", len(files), len(members)) + t.Fatalf("Expected %d templates, got %d", len(files), len(members)) } root := c.loader.dir() diff --git a/pkg/expansion/service_test.go b/pkg/expansion/service_test.go index 8b6db35fe..9bce098fb 100644 --- a/pkg/expansion/service_test.go +++ b/pkg/expansion/service_test.go @@ -90,7 +90,7 @@ func GeneralTest(t *testing.T, httpMeth string, url string, contentType string, } var data = w.Body.Bytes() if w.Code != expStatus { - t.Fatalf("wrong status code:\nwant: %s\ngot: %s\ncontent: %s\n", expStatus, w.Code, data) + t.Fatalf("wrong status code:\nwant: %d\ngot: %d\ncontent: %s\n", expStatus, w.Code, data) } if expResponse != nil { var response ServiceResponse diff --git a/scripts/validate-go.sh b/scripts/validate-go.sh index 07e5af0f9..127946386 100755 --- a/scripts/validate-go.sh +++ b/scripts/validate-go.sh @@ -36,11 +36,9 @@ for pkg in $(glide nv); do done echo "==> Running go vet..." -if ! vet_out=$(go vet "$(glide nv)" 2>&1); then - echo - echo "${red}${vet_out}${reset}" - exit_code=1 -fi +echo -n "$red" +go vet $(glide nv) 2>&1 | grep -v "^exit status " || exit_code=${PIPESTATUS[0]} +echo -n "$reset" echo "==> Running gofmt..." failed_fmt=$(find_go_files | xargs gofmt -s -l)