Skip to content

Commit

Permalink
we were dropping an error that should have come through
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Evett committed Feb 5, 2018
1 parent 55c7f1e commit fd51e80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion harness/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func RunAllTests(c *gin.Context) {
p := path.(string)
result, err := r.RunAllTests(p)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"status": http.StatusInternalServerError, "data": result, "error": "error returned from RunAllTests " + err.Error()})
c.JSON(http.StatusInternalServerError, gin.H{"status": http.StatusInternalServerError, "data": result})
} else {
c.JSON(http.StatusOK, gin.H{"status": http.StatusOK, "data": result})
}
Expand Down
4 changes: 2 additions & 2 deletions verifiers/inspec/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (i *InspecVerifier) Setup(path string) error {

func (i *InspecVerifier) Check(path string) (verifiers.TestSuite, error) {
///func (i *InspecVerifier) Check(path string) (verifiers.TestSuite, error) {
r, err := ExecInspecTests(path)
r, inspecerr := ExecInspecTests(path)
// think we need to eat the error here, inspec returns 1 if a failure occurs and we want to ignore it
// if err != nil {
// fmt.Println("error running tests")
Expand All @@ -42,7 +42,7 @@ func (i *InspecVerifier) Check(path string) (verifiers.TestSuite, error) {
}
// need to call the tranform bit here
// may not need a seperate file tho
return suite, err
return suite, inspecerr
}

var execCommand = exec.Command
Expand Down

0 comments on commit fd51e80

Please sign in to comment.