mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-19 13:39:26 +00:00
32 lines
617 B
Go
32 lines
617 B
Go
|
// Copyright 2020 The Gitea Authors. All rights reserved.
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
package packages
|
||
|
|
||
|
import (
|
||
|
"path/filepath"
|
||
|
"testing"
|
||
|
|
||
|
"forgejo.org/models/unittest"
|
||
|
"forgejo.org/modules/setting"
|
||
|
|
||
|
_ "forgejo.org/models"
|
||
|
_ "forgejo.org/models/actions"
|
||
|
_ "forgejo.org/models/activities"
|
||
|
_ "forgejo.org/models/forgefed"
|
||
|
)
|
||
|
|
||
|
func AddFixtures(dirs ...string) func() {
|
||
|
return unittest.OverrideFixtures(
|
||
|
unittest.FixturesOptions{
|
||
|
Dir: filepath.Join(setting.AppWorkPath, "models/fixtures/"),
|
||
|
Base: setting.AppWorkPath,
|
||
|
Dirs: dirs,
|
||
|
},
|
||
|
)
|
||
|
}
|
||
|
|
||
|
func TestMain(m *testing.M) {
|
||
|
unittest.MainTest(m)
|
||
|
}
|