[ARVADOS] updated: 2.1.0-1613-g365b9ca0e

Git user git at public.arvados.org
Mon Nov 15 18:11:53 UTC 2021


Summary of changes:
 lib/controller/router/router_test.go | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

       via  365b9ca0ea4291d9864297593d185aeef66457ba (commit)
      from  a969c0d3e97c2aeff0b64f9f0c8052f71eefa576 (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 365b9ca0ea4291d9864297593d185aeef66457ba
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Mon Nov 15 15:11:30 2021 -0300

    18215: Adds tests for Create & Update calls.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/lib/controller/router/router_test.go b/lib/controller/router/router_test.go
index 722895645..ce440dac5 100644
--- a/lib/controller/router/router_test.go
+++ b/lib/controller/router/router_test.go
@@ -379,6 +379,7 @@ func (s *RouterIntegrationSuite) TestFullTimestampsInResponse(c *check.C) {
 func (s *RouterIntegrationSuite) TestSelectParam(c *check.C) {
 	uuid := arvadostest.QueuedContainerUUID
 	token := arvadostest.ActiveTokenV2
+	// GET
 	for _, sel := range [][]string{
 		{"uuid", "command"},
 		{"uuid", "command", "uuid"},
@@ -395,6 +396,26 @@ func (s *RouterIntegrationSuite) TestSelectParam(c *check.C) {
 		_, hasMounts := resp["mounts"]
 		c.Check(hasMounts, check.Equals, false)
 	}
+	// POST & PUT
+	uuid = arvadostest.FooCollection
+	j, err := json.Marshal([]string{"uuid", "description"})
+	c.Assert(err, check.IsNil)
+	for _, method := range []string{"PUT", "POST"} {
+		desc := "Today is " + time.Now().String()
+		reqBody := "{\"description\":\"" + desc + "\"}"
+		var resp map[string]interface{}
+		var rr *httptest.ResponseRecorder
+		if method == "PUT" {
+			_, rr, resp = doRequest(c, s.rtr, token, method, "/arvados/v1/collections/"+uuid+"?select="+string(j), nil, bytes.NewReader([]byte(reqBody)))
+		} else {
+			_, rr, resp = doRequest(c, s.rtr, token, method, "/arvados/v1/collections?select="+string(j), nil, bytes.NewReader([]byte(reqBody)))
+		}
+		c.Check(rr.Code, check.Equals, http.StatusOK)
+		c.Check(resp["kind"], check.Equals, "arvados#collection")
+		c.Check(resp["uuid"], check.HasLen, 27)
+		c.Check(resp["description"], check.Equals, desc)
+		c.Check(resp["manifest_text"], check.IsNil)
+	}
 }
 
 func (s *RouterIntegrationSuite) TestHEAD(c *check.C) {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list