mirror of
https://github.com/go-gitea/gitea
synced 2025-09-28 03:28:13 +00:00
Remove incorrect "db.DefaultContext" usages (#35366)
This commit is contained in:
@@ -7,11 +7,11 @@ import (
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/test"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
type TestCollationTbl struct {
|
||||
@@ -20,7 +20,7 @@ type TestCollationTbl struct {
|
||||
}
|
||||
|
||||
func TestDatabaseCollation(t *testing.T) {
|
||||
x := db.GetEngine(db.DefaultContext).(*xorm.Engine)
|
||||
x := unittest.GetXORMEngine()
|
||||
|
||||
// all created tables should use case-sensitive collation by default
|
||||
_, _ = x.Exec("DROP TABLE IF EXISTS test_collation_tbl")
|
||||
|
Reference in New Issue
Block a user