forked from forgejo/forgejo
upgrade to use testfixtures v3 (#11904)
* upgrade to use testfixtures v3 * simplify logic * make vendor * update per @lunny * Update templates/repo/empty.tmpl * Update templates/repo/empty.tmpl Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
1645d4a5d8
commit
9e6a79bea9
97 changed files with 8814 additions and 5464 deletions
|
@ -36,7 +36,6 @@ import (
|
|||
"github.com/PuerkitoBio/goquery"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/unknwon/com"
|
||||
"gopkg.in/testfixtures.v2"
|
||||
)
|
||||
|
||||
var mac *macaron.Macaron
|
||||
|
@ -88,22 +87,7 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
}
|
||||
|
||||
var helper testfixtures.Helper
|
||||
if setting.Database.UseMySQL {
|
||||
helper = &testfixtures.MySQL{}
|
||||
} else if setting.Database.UsePostgreSQL {
|
||||
helper = &testfixtures.PostgreSQL{}
|
||||
} else if setting.Database.UseSQLite3 {
|
||||
helper = &testfixtures.SQLite{}
|
||||
} else if setting.Database.UseMSSQL {
|
||||
helper = &testfixtures.SQLServer{}
|
||||
} else {
|
||||
fmt.Println("Unsupported RDBMS for integration tests")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
err := models.InitFixtures(
|
||||
helper,
|
||||
path.Join(filepath.Dir(setting.AppPath), "models/fixtures/"),
|
||||
)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue