[ARVADOS] updated: 2.1.0-107-ga35b5abb7

Git user git at public.arvados.org
Thu Nov 19 16:46:40 UTC 2020


Summary of changes:
 lib/controller/federation_test.go | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

       via  a35b5abb70b41d1f3186c9639490aa4ff1af33e1 (commit)
      from  5c7576f6e9100c994dcbcb26c9592640686d5add (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 a35b5abb70b41d1f3186c9639490aa4ff1af33e1
Author: Nico Cesar <nico at nicocesar.com>
Date:   Thu Nov 19 11:46:21 2020 -0500

    Adding old tests that fail
    
    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 891e49180..6b67a7e4c 100644
--- a/lib/controller/federation_test.go
+++ b/lib/controller/federation_test.go
@@ -587,6 +587,21 @@ func (s *FederationSuite) TestUpdateRemoteContainerRequest(c *check.C) {
 	setPri(1) // Reset fixture so side effect doesn't break other tests.
 }
 
+func (s *FederationSuite) TestCreateContainerRequestBadToken(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":{}}`))
+	req.Header.Set("Authorization", "Bearer abcdefg")
+	req.Header.Set("Content-type", "application/json")
+	resp := s.testRequest(req).Result()
+	c.Check(resp.StatusCode, check.Equals, http.StatusForbidden)
+	var e map[string][]string
+	c.Check(json.NewDecoder(resp.Body).Decode(&e), check.IsNil)
+	c.Check(e["errors"], check.DeepEquals, []string{"invalid API token"})
+}
+
 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