X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0a98e961b638af177b6e0aebf63f1388cb2b3498:/services/arv-git-httpd/git_handler_test.go..00f65f60e69326839447f431146312481db05f01:/services/githttpd/git_handler_test.go diff --git a/services/arv-git-httpd/git_handler_test.go b/services/githttpd/git_handler_test.go similarity index 94% rename from services/arv-git-httpd/git_handler_test.go rename to services/githttpd/git_handler_test.go index dafe5d31d7..ef2ee28e79 100644 --- a/services/arv-git-httpd/git_handler_test.go +++ b/services/githttpd/git_handler_test.go @@ -2,9 +2,10 @@ // // SPDX-License-Identifier: AGPL-3.0 -package main +package githttpd import ( + "context" "net/http" "net/http/httptest" "net/url" @@ -42,7 +43,7 @@ func (s *GitHandlerSuite) TestEnvVars(c *check.C) { URL: u, RemoteAddr: "[::1]:12345", } - h := newGitHandler(s.cluster) + h := newGitHandler(context.Background(), s.cluster) h.(*gitHandler).Path = "/bin/sh" h.(*gitHandler).Args = []string{"-c", "printf 'Content-Type: text/plain\r\n\r\n'; env"} @@ -67,7 +68,7 @@ func (s *GitHandlerSuite) TestCGIErrorOnSplitHostPortError(c *check.C) { URL: u, RemoteAddr: "test.bad.address.missing.port", } - h := newGitHandler(s.cluster) + h := newGitHandler(context.Background(), s.cluster) h.ServeHTTP(resp, req) c.Check(resp.Code, check.Equals, http.StatusInternalServerError) c.Check(resp.Body.String(), check.Equals, "")