diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-12-03 10:48:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 10:48:26 +0800 |
commit | 0a7d3ff786508284224ada17956a65bb759d9265 (patch) | |
tree | 4860fca95c1432ab59c6723ee2b053b1c7d6779d /tests/integration/git_test.go | |
parent | 8698458f48eafeab21014db544aa7160368856e1 (diff) | |
download | gitea-0a7d3ff786508284224ada17956a65bb759d9265.tar.gz gitea-0a7d3ff786508284224ada17956a65bb759d9265.zip |
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'tests/integration/git_test.go')
-rw-r--r-- | tests/integration/git_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/git_test.go b/tests/integration/git_test.go index 6508df1ef0..8d29a161d5 100644 --- a/tests/integration/git_test.go +++ b/tests/integration/git_test.go @@ -570,7 +570,7 @@ func doPushCreate(ctx APITestContext, u *url.URL) func(t *testing.T) { t.Run("SuccessfullyPushAndCreateTestRepository", doGitPushTestRepository(tmpDir, "origin", "master")) // Finally, fetch repo from database and ensure the correct repository has been created - repo, err := repo_model.GetRepositoryByOwnerAndName(ctx.Username, ctx.Reponame) + repo, err := repo_model.GetRepositoryByOwnerAndName(db.DefaultContext, ctx.Username, ctx.Reponame) assert.NoError(t, err) assert.False(t, repo.IsEmpty) assert.True(t, repo.IsPrivate) @@ -698,7 +698,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, baseBranch, headB pr1, pr2 *issues_model.PullRequest commit string ) - repo, err := repo_model.GetRepositoryByOwnerAndName(ctx.Username, ctx.Reponame) + repo, err := repo_model.GetRepositoryByOwnerAndName(db.DefaultContext, ctx.Username, ctx.Reponame) if !assert.NoError(t, err) { return } |