projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
11809: Add tests for /status.json.
[arvados.git]
/
services
/
keep-web
/
handler_test.go
diff --git
a/services/keep-web/handler_test.go
b/services/keep-web/handler_test.go
index 57ac2190c4cfe9d3a75278cce1c38b3a282eff89..df0346ba315f420ce5aae5dd2d3a59c06e4e87fb 100644
(file)
--- 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) {
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",
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()
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)
}
h.ServeHTTP(resp, req)
c.Check(resp.Code, check.Equals, http.StatusNotFound)
}