aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/mirror_pull_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/mirror_pull_test.go')
-rw-r--r--tests/integration/mirror_pull_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/integration/mirror_pull_test.go b/tests/integration/mirror_pull_test.go
index 753b7e7663..1bd91a48b5 100644
--- a/tests/integration/mirror_pull_test.go
+++ b/tests/integration/mirror_pull_test.go
@@ -7,6 +7,7 @@ import (
"context"
"testing"
+ "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"
@@ -57,7 +58,7 @@ func TestMirrorPull(t *testing.T) {
defer gitRepo.Close()
findOptions := repo_model.FindReleasesOptions{IncludeDrafts: true, IncludeTags: true}
- initCount, err := repo_model.GetReleaseCountByRepoID(mirror.ID, findOptions)
+ initCount, err := repo_model.GetReleaseCountByRepoID(db.DefaultContext, mirror.ID, findOptions)
assert.NoError(t, err)
assert.NoError(t, release_service.CreateRelease(gitRepo, &repo_model.Release{
@@ -80,7 +81,7 @@ func TestMirrorPull(t *testing.T) {
ok := mirror_service.SyncPullMirror(ctx, mirror.ID)
assert.True(t, ok)
- count, err := repo_model.GetReleaseCountByRepoID(mirror.ID, findOptions)
+ count, err := repo_model.GetReleaseCountByRepoID(db.DefaultContext, mirror.ID, findOptions)
assert.NoError(t, err)
assert.EqualValues(t, initCount+1, count)
@@ -91,7 +92,7 @@ func TestMirrorPull(t *testing.T) {
ok = mirror_service.SyncPullMirror(ctx, mirror.ID)
assert.True(t, ok)
- count, err = repo_model.GetReleaseCountByRepoID(mirror.ID, findOptions)
+ count, err = repo_model.GetReleaseCountByRepoID(db.DefaultContext, mirror.ID, findOptions)
assert.NoError(t, err)
assert.EqualValues(t, initCount, count)
}