mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 19:27:29 +02:00
Decouple unit test, remove intermediate unittestbridge package (#17662)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
1 parent
23bd7b1211
commit
81926d61db
151 files changed
+1719
-1781
No files matched your search
@@ -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