Makes it so harness can bootstrap using the new GoRequest / response wrappers

This commit is contained in:
NotZippy
2017-04-04 17:17:23 -07:00
parent 0f47be728a
commit d2b1730439
2 changed files with 6 additions and 3 deletions

View File

@@ -47,7 +47,10 @@ type Harness struct {
proxy *httputil.ReverseProxy
}
func renderError(w http.ResponseWriter, r *http.Request, err error) {
func renderError(iw http.ResponseWriter, ir *http.Request, err error) {
r,w := &revel.GORequest{Goheader:&revel.GOHeader{}}, &revel.GOResponse{Goheader:&revel.GOHeader{}}
r.Set(ir)
w.Set(iw)
req, resp := revel.NewRequest(r), revel.NewResponse(w)
c := revel.NewController(req, resp)
c.RenderError(err).Apply(req, resp)