From fd51e809cd4c4d9e21ba208a92000aa16adbdf78 Mon Sep 17 00:00:00 2001 From: Chris Evett Date: Mon, 5 Feb 2018 12:09:10 -0500 Subject: [PATCH] we were dropping an error that should have come through --- harness/get.go | 2 +- verifiers/inspec/verifier.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/harness/get.go b/harness/get.go index 5097414..f384386 100644 --- a/harness/get.go +++ b/harness/get.go @@ -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}) } diff --git a/verifiers/inspec/verifier.go b/verifiers/inspec/verifier.go index de1225d..91f38a3 100644 --- a/verifiers/inspec/verifier.go +++ b/verifiers/inspec/verifier.go @@ -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") @@ -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