diff --git a/test/execution_test.go b/test/execution_test.go index 9fb06f7..906e081 100644 --- a/test/execution_test.go +++ b/test/execution_test.go @@ -48,7 +48,8 @@ paths: expectedStdOut := `{ "hello": "world" -}` +} +` if result.StdOut != expectedStdOut { t.Errorf("Expected response body on stdout %v, got: %v", expectedStdOut, result.StdOut) } diff --git a/utils/http_logger.go b/utils/http_logger.go index 1fbe6cc..133e3dc 100644 --- a/utils/http_logger.go +++ b/utils/http_logger.go @@ -76,6 +76,8 @@ func (l HttpLogger) LogResponse(response *http.Response) error { response.Body = io.NopCloser(bytes.NewBuffer(body)) if len(body) == 0 && response.StatusCode >= 400 { fmt.Fprintf(l.Output, "%s %s\n", response.Proto, response.Status) + } else { + fmt.Fprint(l.Output, "\n") } return err }