X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/be4852ec32e5eeed1af9a62017cfc39ed66ac186..7e0409e3b5e2fd80f7a74feb719dbc41c2193ef6:/services/keep-web/handler_test.go diff --git a/services/keep-web/handler_test.go b/services/keep-web/handler_test.go index 57ac2190c4..df0346ba31 100644 --- a/services/keep-web/handler_test.go +++ b/services/keep-web/handler_test.go @@ -19,7 +19,7 @@ var _ = check.Suite(&UnitSuite{}) type UnitSuite struct{} func (s *UnitSuite) TestCORSPreflight(c *check.C) { - h := handler{Config: &Config{}} + h := handler{Config: DefaultConfig()} u, _ := url.Parse("http://keep-web.example/c=" + arvadostest.FooCollection + "/foo") req := &http.Request{ Method: "OPTIONS", @@ -70,9 +70,9 @@ func (s *UnitSuite) TestInvalidUUID(c *check.C) { RequestURI: u.RequestURI(), } resp := httptest.NewRecorder() - h := handler{Config: &Config{ - AnonymousTokens: []string{arvadostest.AnonymousToken}, - }} + cfg := DefaultConfig() + cfg.AnonymousTokens = []string{arvadostest.AnonymousToken} + h := handler{Config: cfg} h.ServeHTTP(resp, req) c.Check(resp.Code, check.Equals, http.StatusNotFound) }