aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJason Song2023-03-01 06:17:51 +0800
committerGitHub2023-02-28 16:17:51 -0600
commit04347eb810689db799003cc342bbbc756716ff12 (patch)
treea7131234f7f93717d8988cf39cc04e277823ceb7 /tests
parentcbbd3726b4edb3c2bda59610050fd5af149fbdb1 (diff)
Use context parameter in services/repository (#23186)
Use context parameter in `services/repository`. And use `cache.WithCacheContext(ctx)` to generate push action history feeds. Fix #23160
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/pull_merge_test.go2
-rw-r--r--tests/integration/pull_update_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/pull_merge_test.go b/tests/integration/pull_merge_test.go
index 090a27c39..55cf29525 100644
--- a/tests/integration/pull_merge_test.go
+++ b/tests/integration/pull_merge_test.go
@@ -356,7 +356,7 @@ func TestConflictChecking(t *testing.T) {
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
// Create new clean repo to test conflict checking.
- baseRepo, err := repo_service.CreateRepository(user, user, repo_module.CreateRepoOptions{
+ baseRepo, err := repo_service.CreateRepository(db.DefaultContext, user, user, repo_module.CreateRepoOptions{
Name: "conflict-checking",
Description: "Tempo repo",
AutoInit: true,
diff --git a/tests/integration/pull_update_test.go b/tests/integration/pull_update_test.go
index bd416e5bc..1b6665651 100644
--- a/tests/integration/pull_update_test.go
+++ b/tests/integration/pull_update_test.go
@@ -80,7 +80,7 @@ func TestAPIPullUpdateByRebase(t *testing.T) {
}
func createOutdatedPR(t *testing.T, actor, forkOrg *user_model.User) *issues_model.PullRequest {
- baseRepo, err := repo_service.CreateRepository(actor, actor, repo_module.CreateRepoOptions{
+ baseRepo, err := repo_service.CreateRepository(db.DefaultContext, actor, actor, repo_module.CreateRepoOptions{
Name: "repo-pr-update",
Description: "repo-tmp-pr-update description",
AutoInit: true,