Fix dump test
This commit is contained in:
parent
79cdec7d88
commit
6b55eda7ee
|
@ -85,7 +85,7 @@ func TestDump(t *testing.T) {
|
||||||
{Name: "5'\n"},
|
{Name: "5'\n"},
|
||||||
})
|
})
|
||||||
|
|
||||||
fp := testEngine.Dialect().URI().DBName + ".sql"
|
fp := fmt.Sprintf("%v.sql", testEngine.Dialect().URI().DBType)
|
||||||
os.Remove(fp)
|
os.Remove(fp)
|
||||||
assert.NoError(t, testEngine.DumpAllToFile(fp))
|
assert.NoError(t, testEngine.DumpAllToFile(fp))
|
||||||
|
|
||||||
|
@ -99,8 +99,9 @@ func TestDump(t *testing.T) {
|
||||||
assert.NoError(t, sess.Commit())
|
assert.NoError(t, sess.Commit())
|
||||||
|
|
||||||
for _, tp := range []schemas.DBType{schemas.SQLITE, schemas.MYSQL, schemas.POSTGRES, schemas.MSSQL} {
|
for _, tp := range []schemas.DBType{schemas.SQLITE, schemas.MYSQL, schemas.POSTGRES, schemas.MSSQL} {
|
||||||
t.Run(fmt.Sprintf("dump_%v", tp), func(t *testing.T) {
|
name := fmt.Sprintf("dump_%v.sql", tp)
|
||||||
assert.NoError(t, testEngine.DumpAllToFile(fp, tp))
|
t.Run(name, func(t *testing.T) {
|
||||||
|
assert.NoError(t, testEngine.DumpAllToFile(name, tp))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue