Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Fail integration test when a command returns a non-zero exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynvs committed Apr 16, 2017
1 parent ee2a6d8 commit a6c3b4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/dep/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ func TestIntegration(t *testing.T) {
// Run commands
testProj.RecordImportPaths()
for _, args := range testCase.Commands {
testProj.DoRun(args)
err = testProj.DoRun(args)
if err != nil {
t.Fatalf("%v", err)
}
}

// Check final manifest and lock
Expand Down
2 changes: 1 addition & 1 deletion test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (h *Helper) DoRun(args []string) error {
}
}
h.ran = true
return status
return errors.Wrapf(status, "Error running %s\n%s", strings.Join(newargs, " "), h.stderr.String())
}

// run runs the test go command, and expects it to succeed.
Expand Down

0 comments on commit a6c3b4f

Please sign in to comment.