MariaDB tests fix.

This commit is contained in:
go-jet 2019-08-15 11:59:17 +02:00
parent bf3ec27f68
commit 0dbdbb9220
8 changed files with 170 additions and 118 deletions

View file

@ -2,6 +2,7 @@ package mysql
import (
"database/sql"
"flag"
"github.com/go-jet/jet/tests/dbconfig"
_ "github.com/go-sql-driver/mysql"
@ -13,6 +14,19 @@ import (
var db *sql.DB
var source string
const MariaDB = "MariaDB"
func init() {
flag.StringVar(&source, "source", "", "MySQL or MariaDB")
flag.Parse()
}
func sourceIsMariaDB() bool {
return source == MariaDB
}
func TestMain(m *testing.M) {
defer profile.Start().Stop()