Decouple unit test, remove intermediate unittestbridge
package (#17662)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
)
|
||||
|
||||
@ -33,7 +33,7 @@ func BenchmarkRepoBranchCommit(b *testing.B) {
|
||||
|
||||
for _, repoID := range samples {
|
||||
b.StopTimer()
|
||||
repo := db.AssertExistsAndLoadBean(b, &models.Repository{ID: repoID}).(*models.Repository)
|
||||
repo := unittest.AssertExistsAndLoadBean(b, &models.Repository{ID: repoID}).(*models.Repository)
|
||||
b.StartTimer()
|
||||
b.Run(repo.Name, func(b *testing.B) {
|
||||
session := loginUser(b, "user2")
|
||||
|
Reference in New Issue
Block a user