summaryrefslogtreecommitdiffstats
path: root/modules/git/repo_commit_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_commit_test.go')
-rw-r--r--modules/git/repo_commit_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/git/repo_commit_test.go b/modules/git/repo_commit_test.go
index 6d8ee6453f..87dd6763b3 100644
--- a/modules/git/repo_commit_test.go
+++ b/modules/git/repo_commit_test.go
@@ -15,6 +15,7 @@ func TestRepository_GetCommitBranches(t *testing.T) {
bareRepo1Path := filepath.Join(testReposDir, "repo1_bare")
bareRepo1, err := OpenRepository(bareRepo1Path)
assert.NoError(t, err)
+ defer bareRepo1.Close()
// these test case are specific to the repo1_bare test repo
testCases := []struct {
@@ -41,6 +42,7 @@ func TestGetTagCommitWithSignature(t *testing.T) {
bareRepo1Path := filepath.Join(testReposDir, "repo1_bare")
bareRepo1, err := OpenRepository(bareRepo1Path)
assert.NoError(t, err)
+ defer bareRepo1.Close()
commit, err := bareRepo1.GetCommit("3ad28a9149a2864384548f3d17ed7f38014c9e8a")
assert.NoError(t, err)
@@ -54,6 +56,7 @@ func TestGetCommitWithBadCommitID(t *testing.T) {
bareRepo1Path := filepath.Join(testReposDir, "repo1_bare")
bareRepo1, err := OpenRepository(bareRepo1Path)
assert.NoError(t, err)
+ defer bareRepo1.Close()
commit, err := bareRepo1.GetCommit("bad_branch")
assert.Nil(t, commit)