1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
13 "git.arvados.org/arvados.git/sdk/go/arvadostest"
17 func (s *UnitSuite) TestStatus(c *check.C) {
18 u, _ := url.Parse("http://keep-web.example/status.json")
23 RequestURI: u.RequestURI(),
25 resp := httptest.NewRecorder()
26 s.handler.ServeHTTP(resp, req)
27 c.Check(resp.Code, check.Equals, http.StatusOK)
29 var status map[string]interface{}
30 err := json.NewDecoder(resp.Body).Decode(&status)
31 c.Check(err, check.IsNil)
32 c.Check(status["Version"], check.Not(check.Equals), "")
35 func (s *IntegrationSuite) TestNoStatusFromVHost(c *check.C) {
36 u, _ := url.Parse("http://" + arvadostest.FooCollection + "--keep-web.example/status.json")
41 RequestURI: u.RequestURI(),
43 "Authorization": {"Bearer " + arvadostest.ActiveToken},
46 resp := httptest.NewRecorder()
47 s.handler.ServeHTTP(resp, req)
48 c.Check(resp.Code, check.Equals, http.StatusNotFound)