[ARVADOS] updated: 2.1.0-109-g53a45d3d1
Git user
git at public.arvados.org
Mon Nov 30 17:10:53 UTC 2020
Summary of changes:
lib/controller/federation_test.go | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
via 53a45d3d128d86828d76ef95a0877a93d837a209 (commit)
from 5ac49e456c4e30a8c07a7d58fcfbfb89cac6179c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 53a45d3d128d86828d76ef95a0877a93d837a209
Author: Nico Cesar <nico at nicocesar.com>
Date: Mon Nov 30 12:09:54 2020 -0500
adding failing TestCreateRemoteContainerRequest
Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico at curii.com>
diff --git a/lib/controller/federation_test.go b/lib/controller/federation_test.go
index 6b67a7e4c..aa37e3328 100644
--- a/lib/controller/federation_test.go
+++ b/lib/controller/federation_test.go
@@ -602,6 +602,31 @@ func (s *FederationSuite) TestCreateContainerRequestBadToken(c *check.C) {
c.Check(e["errors"], check.DeepEquals, []string{"invalid API token"})
}
+func (s *FederationSuite) TestCreateRemoteContainerRequest(c *check.C) {
+ defer s.localServiceReturns404(c).Close()
+ // pass cluster_id via query parameter, this allows arvados-controller
+ // to avoid parsing the body
+ req := httptest.NewRequest("POST", "/arvados/v1/container_requests?cluster_id=zzzzz",
+ strings.NewReader(`{
+ "container_request": {
+ "name": "hello world",
+ "state": "Uncommitted",
+ "output_path": "/",
+ "container_image": "123",
+ "command": ["abc"]
+ }
+ }
+ `))
+ req.Header.Set("Authorization", "Bearer "+arvadostest.ActiveToken)
+ req.Header.Set("Content-type", "application/json")
+ resp := s.testRequest(req).Result()
+ c.Check(resp.StatusCode, check.Equals, http.StatusOK)
+ var cr arvados.ContainerRequest
+ c.Check(json.NewDecoder(resp.Body).Decode(&cr), check.IsNil)
+ c.Check(cr.Name, check.Equals, "hello world")
+ c.Check(strings.HasPrefix(cr.UUID, "zzzzz-"), check.Equals, true)
+}
+
func (s *FederationSuite) TestCreateRemoteContainerRequestError(c *check.C) {
defer s.localServiceReturns404(c).Close()
// pass cluster_id via query parameter, this allows arvados-controller
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list