From 92f139d091c906cc6d30599101d45c62a208f585 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 3 May 2022 21:46:28 +0200 Subject: Use for a repo action one database transaction (#19576) ... more context (part of #9307) --- modules/git/commit_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/git/commit_test.go') diff --git a/modules/git/commit_test.go b/modules/git/commit_test.go index aac7de5d46..fb8c22dfd3 100644 --- a/modules/git/commit_test.go +++ b/modules/git/commit_test.go @@ -67,6 +67,7 @@ empty commit` gitRepo, err := openRepositoryWithDefaultContext(filepath.Join(testReposDir, "repo1_bare")) assert.NoError(t, err) assert.NotNil(t, gitRepo) + defer gitRepo.Close() commitFromReader, err := CommitFromReader(gitRepo, sha, strings.NewReader(commitString)) assert.NoError(t, err) @@ -111,6 +112,7 @@ func TestHasPreviousCommit(t *testing.T) { repo, err := openRepositoryWithDefaultContext(bareRepo1Path) assert.NoError(t, err) + defer repo.Close() commit, err := repo.GetCommit("8006ff9adbf0cb94da7dad9e537e53817f9fa5c0") assert.NoError(t, err) -- cgit v1.2.3