func NewTestEngine(x *xorm.Engine) (err error) { x, err = getEngine() if err != nil { return fmt.Errorf("Connect to database: %v", err) } x.SetMapper(core.GonicMapper{}) return x.StoreEngine("InnoDB").Sync2(tables...) }