unit tests improvments

This commit is contained in:
konrad 2018-06-10 14:24:33 +02:00 committed by kolaente
parent 2cf20fe1c4
commit b841ec121b
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -32,7 +32,9 @@ func createTestEngine(fixturesDir string) error {
x.SetMapper(core.GonicMapper{})
// Sync dat shit
x.Sync(&User{})
if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil {
return fmt.Errorf("sync database struct error: %v", err)
}
// Show SQL-Queries if nessecary
if os.Getenv("UNIT_TESTS_VERBOSE") == "1" {