projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
15922: Preserve writable_by in user and collection responses.
[arvados.git]
/
lib
/
controller
/
router
/
router_test.go
diff --git
a/lib/controller/router/router_test.go
b/lib/controller/router/router_test.go
index 991e907d535b5f60257a4cd49d8580b8f4f8c4cc..a17bd3bd8b8f43daf6cf52dc61d3cf00ca132f2a 100644
(file)
--- a/
lib/controller/router/router_test.go
+++ b/
lib/controller/router/router_test.go
@@
-16,9
+16,9
@@
import (
"testing"
"time"
"testing"
"time"
- "git.
curoverse.com
/arvados.git/lib/controller/rpc"
- "git.
curoverse.com
/arvados.git/sdk/go/arvados"
- "git.
curoverse.com
/arvados.git/sdk/go/arvadostest"
+ "git.
arvados.org
/arvados.git/lib/controller/rpc"
+ "git.
arvados.org
/arvados.git/sdk/go/arvados"
+ "git.
arvados.org
/arvados.git/sdk/go/arvadostest"
"github.com/gorilla/mux"
check "gopkg.in/check.v1"
)
"github.com/gorilla/mux"
check "gopkg.in/check.v1"
)
@@
-329,6
+329,11
@@
func (s *RouterIntegrationSuite) TestSelectParam(c *check.C) {
}
}
}
}
+func (s *RouterIntegrationSuite) TestHEAD(c *check.C) {
+ _, rr, _ := doRequest(c, s.rtr, arvadostest.ActiveTokenV2, "HEAD", "/arvados/v1/containers/"+arvadostest.QueuedContainerUUID, nil, nil)
+ c.Check(rr.Code, check.Equals, http.StatusOK)
+}
+
func (s *RouterIntegrationSuite) TestRouteNotFound(c *check.C) {
token := arvadostest.ActiveTokenV2
req := (&testReq{
func (s *RouterIntegrationSuite) TestRouteNotFound(c *check.C) {
token := arvadostest.ActiveTokenV2
req := (&testReq{
@@
-364,7
+369,7
@@
func (s *RouterIntegrationSuite) TestCORS(c *check.C) {
for _, hdr := range []string{"Authorization", "Content-Type"} {
c.Check(rr.Result().Header.Get("Access-Control-Allow-Headers"), check.Matches, ".*"+hdr+".*")
}
for _, hdr := range []string{"Authorization", "Content-Type"} {
c.Check(rr.Result().Header.Get("Access-Control-Allow-Headers"), check.Matches, ".*"+hdr+".*")
}
- for _, method := range []string{"GET", "HEAD", "PUT", "POST", "DELETE"} {
+ for _, method := range []string{"GET", "HEAD", "PUT", "POST", "
PATCH", "
DELETE"} {
c.Check(rr.Result().Header.Get("Access-Control-Allow-Methods"), check.Matches, ".*"+method+".*")
}
c.Check(rr.Result().Header.Get("Access-Control-Allow-Methods"), check.Matches, ".*"+method+".*")
}