1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-02 04:18:38 -04:00

Get all current tests to pass with MySQL

This is done by requiring 'parseTime=true' in the MySQL DSN's (required
by github.com/go-sql-driver/mysql when Scan()ing to time.Time's), and
not forcing update counts to match if rows were updated to what they
already were.
This commit is contained in:
2017-10-24 20:57:55 -04:00
parent a1d294c309
commit 3869f3a3b2
5 changed files with 20 additions and 7 deletions

View File

@ -182,7 +182,8 @@ func RunTests(m *testing.M) int {
defer os.RemoveAll(tmpdir)
dbpath := path.Join(tmpdir, "moneygo.sqlite")
database, err := sql.Open("sqlite3", "file:"+dbpath+"?cache=shared&mode=rwc")
dsn := db.GetDSN(config.SQLite, "file:"+dbpath+"?cache=shared&mode=rwc")
database, err := sql.Open("sqlite3", dsn)
if err != nil {
log.Fatal(err)
}