Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
report error on failed location response (#3184)
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
Mark Sargent committed
Mar 24, 2020 at 16:18 UTC
d08cbefff8377c5011c3fc7fb7bc576ac9f56be2
1 file changed
+4
caddytest/caddytest.go
+4
@@ -301,6 +301,10 @@ func AssertRedirect(t *testing.T, requestURI string, expectedToLocation string,
301
}
302
303
loc, err := resp.Location()
304
+ if err != nil {
305
+ t.Errorf("requesting \"%s\" expected location: \"%s\" but got error: %s", requestURI, expectedToLocation, err)
306
+ }
307
+
308
if expectedToLocation != loc.String() {
309
t.Errorf("requesting \"%s\" expected location: \"%s\" but got \"%s\"", requestURI, expectedToLocation, loc.String())
310
}