diff options
author | Alberto Cortés <alberto@sourced.tech> | 2016-01-11 10:59:03 +0100 |
---|---|---|
committer | Alberto Cortés <alberto@sourced.tech> | 2016-01-11 11:43:51 +0100 |
commit | 6d19be9bdb355d2285138ead6cd487920b26fe99 (patch) | |
tree | ad234af3bd3af78992944858abc2095b3199df44 /repository_test.go | |
parent | cebec78608e7913b8c843390237fd609069022ae (diff) | |
download | go-git-6d19be9bdb355d2285138ead6cd487920b26fe99.tar.gz |
missing call to Close on Fetch return value (ReadCloser)
Diffstat (limited to 'repository_test.go')
-rw-r--r-- | repository_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/repository_test.go b/repository_test.go index 20aaf0c..df6ed6b 100644 --- a/repository_test.go +++ b/repository_test.go @@ -31,6 +31,11 @@ func (s *SuiteRepository) TestPull(c *C) { c.Assert(err, IsNil) c.Assert(r.Pull("origin", "refs/heads/master"), IsNil) + + mock, ok := (r.Remotes["origin"].upSrv).(*MockGitUploadPackService) + c.Assert(ok, Equals, true) + err = mock.RC.Close() + c.Assert(err, Not(IsNil), Commentf("pull leaks an open fd from the fetch")) } func (s *SuiteRepository) TestCommit(c *C) { |