16141: Adds better message on test in failing situations.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Mon, 10 Feb 2020 18:40:47 +0000 (15:40 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Mon, 10 Feb 2020 18:40:47 +0000 (15:40 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>

lib/controller/handler_test.go

index fac2f8a825529a2d5f3292318f64381c390599ba..f1d6f15e34fc5b71137ada4b8791d45c79c9ea4b 100644 (file)
@@ -228,11 +228,12 @@ func (s *HandlerSuite) CheckObjectType(c *check.C, url string, token string, ski
        req.Header.Set("Authorization", "Bearer "+token)
        resp := httptest.NewRecorder()
        s.handler.ServeHTTP(resp, req)
-       c.Check(resp.Code, check.Equals, http.StatusOK)
+       c.Assert(resp.Code, check.Equals, http.StatusOK,
+               check.Commentf("Wasn't able to get data from the controller at %q", url))
        err = json.Unmarshal(resp.Body.Bytes(), &proxied)
        c.Check(err, check.Equals, nil)
 
-       // Get collection directly from railsAPI
+       // Get collection directly from RailsAPI
        client := &http.Client{
                Transport: &http.Transport{
                        TLSClientConfig: &tls.Config{InsecureSkipVerify: true},