X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2e0b7fcafcccc50602f8fd4df11b6312467e95fa..424298694945c9f66676bd401753be44f6fc5fa8:/lib/controller/handler_test.go diff --git a/lib/controller/handler_test.go b/lib/controller/handler_test.go index dcd4d26a3b..c132b659da 100644 --- a/lib/controller/handler_test.go +++ b/lib/controller/handler_test.go @@ -35,14 +35,14 @@ type HandlerSuite struct { func (s *HandlerSuite) SetUpTest(c *check.C) { s.cluster = &arvados.Cluster{ ClusterID: "zzzzz", - SystemNodes: map[string]arvados.SystemNode{ + NodeProfiles: map[string]arvados.NodeProfile{ "*": { Controller: arvados.SystemServiceInstance{Listen: ":"}, - RailsAPI: arvados.SystemServiceInstance{Listen: os.Getenv("ARVADOS_API_HOST"), TLS: true}, + RailsAPI: arvados.SystemServiceInstance{Listen: os.Getenv("ARVADOS_TEST_API_HOST"), TLS: true, Insecure: true}, }, }, } - node := s.cluster.SystemNodes["*"] + node := s.cluster.NodeProfiles["*"] s.handler = newHandler(s.cluster, &node) } @@ -70,7 +70,7 @@ func (s *HandlerSuite) TestRequestTimeout(c *check.C) { err := json.Unmarshal(resp.Body.Bytes(), &jresp) c.Check(err, check.IsNil) c.Assert(len(jresp.Errors), check.Equals, 1) - c.Check(jresp.Errors[0], check.Matches, `.*context deadline exceeded`) + c.Check(jresp.Errors[0], check.Matches, `.*context deadline exceeded.*`) } func (s *HandlerSuite) TestProxyWithoutToken(c *check.C) { @@ -101,6 +101,7 @@ func (s *HandlerSuite) TestProxyWithTokenInRequestBody(c *check.C) { "_method": {"GET"}, "api_token": {arvadostest.ActiveToken}, }.Encode())) + req.Header.Set("Content-type", "application/x-www-form-urlencoded") resp := httptest.NewRecorder() s.handler.ServeHTTP(resp, req) c.Check(resp.Code, check.Equals, http.StatusOK)