Merge pull request #517 from adamreese/fix/go-vet

fix(govet): fixes output on go vet
pull/522/head
Adam Reese 9 years ago
commit 7d6b82544b

@ -43,7 +43,8 @@ func TestDeployment(t *testing.T) {
&common.Deployment{ &common.Deployment{
Name: "guestbook.yaml", Name: "guestbook.yaml",
State: &common.DeploymentState{ 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", "Name: guestbook.yaml\nStatus: Failed\nErrors:\n error message\n",

@ -187,7 +187,7 @@ func TestLoadTemplates(t *testing.T) {
} }
if len(members) != len(files) { 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() root := c.loader.dir()

@ -90,7 +90,7 @@ func GeneralTest(t *testing.T, httpMeth string, url string, contentType string,
} }
var data = w.Body.Bytes() var data = w.Body.Bytes()
if w.Code != expStatus { 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 { if expResponse != nil {
var response ServiceResponse var response ServiceResponse

@ -36,11 +36,9 @@ for pkg in $(glide nv); do
done done
echo "==> Running go vet..." echo "==> Running go vet..."
if ! vet_out=$(go vet "$(glide nv)" 2>&1); then echo -n "$red"
echo go vet $(glide nv) 2>&1 | grep -v "^exit status " || exit_code=${PIPESTATUS[0]}
echo "${red}${vet_out}${reset}" echo -n "$reset"
exit_code=1
fi
echo "==> Running gofmt..." echo "==> Running gofmt..."
failed_fmt=$(find_go_files | xargs gofmt -s -l) failed_fmt=$(find_go_files | xargs gofmt -s -l)

Loading…
Cancel
Save