X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8e17ce539b4a90711f4a8059a0eff11b9c64207b..b70c66d296babe5925e853ae2a5e6cfc2f250c0d:/services/arv-git-httpd/git_handler_test.go diff --git a/services/arv-git-httpd/git_handler_test.go b/services/arv-git-httpd/git_handler_test.go index b3e49c59a0..35c2f4884f 100644 --- a/services/arv-git-httpd/git_handler_test.go +++ b/services/arv-git-httpd/git_handler_test.go @@ -25,7 +25,7 @@ func (s *GitHandlerSuite) TestEnvVars(c *check.C) { } h := newGitHandler() h.(*gitHandler).Path = "/bin/sh" - h.(*gitHandler).Args = []string{"-c", "echo HTTP/1.1 200 OK; echo Content-Type: text/plain; echo; env"} + h.(*gitHandler).Args = []string{"-c", "printf 'Content-Type: text/plain\r\n\r\n'; env"} os.Setenv("GITOLITE_HTTP_HOME", "/test/ghh") os.Setenv("GL_BYPASS_ACCESS_CHECKS", "yesplease") @@ -40,14 +40,14 @@ func (s *GitHandlerSuite) TestEnvVars(c *check.C) { c.Check(body, check.Matches, `(?ms).*^SERVER_ADDR=`+regexp.QuoteMeta(theConfig.Addr)+`$.*`) } -func (s *GitHandlerSuite) TestCGIError(c *check.C) { +func (s *GitHandlerSuite) TestCGIErrorOnSplitHostPortError(c *check.C) { u, err := url.Parse("git.zzzzz.arvadosapi.com/test") c.Check(err, check.Equals, nil) resp := httptest.NewRecorder() req := &http.Request{ Method: "GET", URL: u, - RemoteAddr: "bogus", + RemoteAddr: "test.bad.address.missing.port", } h := newGitHandler() h.ServeHTTP(resp, req)