forked from forgejo/forgejo
Add context.Context
to more methods (#21546)
This PR adds a context parameter to a bunch of methods. Some helper `xxxCtx()` methods got replaced with the normal name now. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
fefdb7ffd1
commit
044c754ea5
148 changed files with 1411 additions and 1564 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"testing"
|
||||
|
||||
activities_model "code.gitea.io/gitea/models/activities"
|
||||
"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"
|
||||
|
@ -46,7 +47,7 @@ func TestRenameRepoAction(t *testing.T) {
|
|||
}
|
||||
unittest.AssertNotExistsBean(t, actionBean)
|
||||
|
||||
NewNotifier().NotifyRenameRepository(user, repo, oldRepoName)
|
||||
NewNotifier().NotifyRenameRepository(db.DefaultContext, user, repo, oldRepoName)
|
||||
|
||||
unittest.AssertExistsAndLoadBean(t, actionBean)
|
||||
unittest.CheckConsistencyFor(t, &activities_model.Action{})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue