Generator tests for MySQL.

This commit is contained in:
go-jet 2019-08-08 17:51:20 +02:00
parent e07980c4d9
commit 070d82f90f
5 changed files with 441 additions and 231 deletions

29
tests/mysql/main_test.go Normal file
View file

@ -0,0 +1,29 @@
package mysql
import (
"database/sql"
"github.com/go-jet/jet/tests/dbconfig"
_ "github.com/go-sql-driver/mysql"
"github.com/pkg/profile"
"os"
"testing"
)
var db *sql.DB
func TestMain(m *testing.M) {
defer profile.Start().Stop()
var err error
db, err = sql.Open("mysql", dbconfig.MySQLConnectionString)
if err != nil {
panic("Failed to connect to test db" + err.Error())
}
defer db.Close()
ret := m.Run()
os.Exit(ret)
}