aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/pull_merge_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-05-20 22:08:52 +0800
committerGitHub <noreply@github.com>2022-05-20 22:08:52 +0800
commitfd7d83ace60258acf7139c4c787aa8af75b7ba8c (patch)
tree50038348ec10485f72344f3ac80324e04abc1283 /integrations/pull_merge_test.go
parentd81e31ad7826a81fc7139f329f250594610a274b (diff)
downloadgitea-fd7d83ace60258acf7139c4c787aa8af75b7ba8c.tar.gz
gitea-fd7d83ace60258acf7139c4c787aa8af75b7ba8c.zip
Move almost all functions' parameter db.Engine to context.Context (#19748)
* Move almost all functions' parameter db.Engine to context.Context * remove some unnecessary wrap functions
Diffstat (limited to 'integrations/pull_merge_test.go')
-rw-r--r--integrations/pull_merge_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/integrations/pull_merge_test.go b/integrations/pull_merge_test.go
index cfe8b4afed..6c5b67caa6 100644
--- a/integrations/pull_merge_test.go
+++ b/integrations/pull_merge_test.go
@@ -18,6 +18,7 @@ import (
"time"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
@@ -407,7 +408,7 @@ func TestConflictChecking(t *testing.T) {
assert.NoError(t, err)
issue := unittest.AssertExistsAndLoadBean(t, &models.Issue{Title: "PR with conflict!"}).(*models.Issue)
- conflictingPR, err := models.GetPullRequestByIssueID(issue.ID)
+ conflictingPR, err := models.GetPullRequestByIssueID(db.DefaultContext, issue.ID)
assert.NoError(t, err)
// Ensure conflictedFiles is populated.