aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_repo_file_create_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-11-13 18:51:33 +0000
committerGitHub <noreply@github.com>2019-11-13 18:51:33 +0000
commitfb5af37b3e1a29eff15281d76cada6ab3fb04974 (patch)
tree3653cbf7122ca7ddfe8612687295a940669a9c36 /integrations/api_repo_file_create_test.go
parent2ef37522b6c8b1ae05f07755718751744162908a (diff)
downloadgitea-fb5af37b3e1a29eff15281d76cada6ab3fb04974.tar.gz
gitea-fb5af37b3e1a29eff15281d76cada6ab3fb04974.zip
Add Close() method to gogitRepository (#8901) (#8958)
Backport #8901 - Adjusted slightly for 1.9 In investigating #7947 it has become clear that the storage component of go-git repositories needs closing. This PR adds this Close function and adds the Close functions as necessary. In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files. Fixes #7947
Diffstat (limited to 'integrations/api_repo_file_create_test.go')
-rw-r--r--integrations/api_repo_file_create_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/integrations/api_repo_file_create_test.go b/integrations/api_repo_file_create_test.go
index 42898bf259..948d3b6f1c 100644
--- a/integrations/api_repo_file_create_test.go
+++ b/integrations/api_repo_file_create_test.go
@@ -139,6 +139,7 @@ func TestAPICreateFile(t *testing.T) {
assert.EqualValues(t, expectedFileResponse.Commit.HTMLURL, fileResponse.Commit.HTMLURL)
assert.EqualValues(t, expectedFileResponse.Commit.Author.Email, fileResponse.Commit.Author.Email)
assert.EqualValues(t, expectedFileResponse.Commit.Author.Name, fileResponse.Commit.Author.Name)
+ gitRepo.Close()
}
// Test creating a file in a new branch