summaryrefslogtreecommitdiffstats
path: root/modules/git/repo_blob_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_blob_test.go')
-rw-r--r--modules/git/repo_blob_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/git/repo_blob_test.go b/modules/git/repo_blob_test.go
index 128a227829..52a124db2a 100644
--- a/modules/git/repo_blob_test.go
+++ b/modules/git/repo_blob_test.go
@@ -17,6 +17,7 @@ func TestRepository_GetBlob_Found(t *testing.T) {
repoPath := filepath.Join(testReposDir, "repo1_bare")
r, err := OpenRepository(repoPath)
assert.NoError(t, err)
+ defer r.Close()
testCases := []struct {
OID string
@@ -44,6 +45,7 @@ func TestRepository_GetBlob_NotExist(t *testing.T) {
repoPath := filepath.Join(testReposDir, "repo1_bare")
r, err := OpenRepository(repoPath)
assert.NoError(t, err)
+ defer r.Close()
testCase := "0000000000000000000000000000000000000000"
testError := ErrNotExist{testCase, ""}
@@ -57,6 +59,7 @@ func TestRepository_GetBlob_NoId(t *testing.T) {
repoPath := filepath.Join(testReposDir, "repo1_bare")
r, err := OpenRepository(repoPath)
assert.NoError(t, err)
+ defer r.Close()
testCase := ""
testError := fmt.Errorf("Length must be 40: %s", testCase)