[arvados] updated: 2.6.0-197-g40dcd4417

git repository hosting git at public.arvados.org
Thu May 25 17:58:13 UTC 2023


Summary of changes:
 lib/controller/integration_test.go | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

       via  40dcd44173ea6d6cdc53206766875151eac7b0fd (commit)
      from  84c80680c3ac6b0b1cd44de40a05f77eb82ca1c9 (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 40dcd44173ea6d6cdc53206766875151eac7b0fd
Author: Tom Clegg <tom at curii.com>
Date:   Thu May 25 13:57:58 2023 -0400

    20511: Fix unclosed response body in test.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/controller/integration_test.go b/lib/controller/integration_test.go
index 12fc50089..0557aa3fd 100644
--- a/lib/controller/integration_test.go
+++ b/lib/controller/integration_test.go
@@ -501,6 +501,7 @@ func (s *IntegrationSuite) TestCreateContainerRequestWithFedToken(c *check.C) {
 	req.Header.Set("Authorization", "OAuth2 "+ac2.AuthToken)
 	resp, err = arvados.InsecureHTTPClient.Do(req)
 	c.Assert(err, check.IsNil)
+	defer resp.Body.Close()
 	err = json.NewDecoder(resp.Body).Decode(&cr)
 	c.Check(err, check.IsNil)
 	c.Check(cr.UUID, check.Matches, "z2222-.*")
@@ -538,8 +539,10 @@ func (s *IntegrationSuite) TestCreateContainerRequestWithBadToken(c *check.C) {
 		c.Assert(err, check.IsNil)
 		req.Header.Set("Content-Type", "application/json")
 		resp, err := ac1.Do(req)
-		c.Assert(err, check.IsNil)
-		c.Assert(resp.StatusCode, check.Equals, tt.expectedCode)
+		if c.Check(err, check.IsNil) {
+			c.Assert(resp.StatusCode, check.Equals, tt.expectedCode)
+			resp.Body.Close()
+		}
 	}
 }
 
@@ -607,9 +610,11 @@ func (s *IntegrationSuite) TestRequestIDHeader(c *check.C) {
 			var jresp httpserver.ErrorResponse
 			err := json.NewDecoder(resp.Body).Decode(&jresp)
 			c.Check(err, check.IsNil)
-			c.Assert(jresp.Errors, check.HasLen, 1)
-			c.Check(jresp.Errors[0], check.Matches, `.*\(`+respHdr+`\).*`)
+			if c.Check(jresp.Errors, check.HasLen, 1) {
+				c.Check(jresp.Errors[0], check.Matches, `.*\(`+respHdr+`\).*`)
+			}
 		}
+		resp.Body.Close()
 	}
 }
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list