From b841ec121bb78ac4ea792d0eed3b0d5c2a409a9d Mon Sep 17 00:00:00 2001 From: konrad Date: Sun, 10 Jun 2018 14:24:33 +0200 Subject: [PATCH] unit tests improvments --- models/unit_tests.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/unit_tests.go b/models/unit_tests.go index e6f17e577..98cf649c9 100644 --- a/models/unit_tests.go +++ b/models/unit_tests.go @@ -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" {