[wip] add run tests

This commit is contained in:
Simon Vieille 2024-03-20 14:19:05 +01:00
parent 0b598ef0b2
commit d10b039d00
Signed by untrusted user: deblan
GPG key ID: 579388D585F70417

View file

@ -45,8 +45,6 @@ func TestAppDoAction(t *testing.T) {
}
func TestAppRun(t *testing.T) {
databaseConfig, _ := config.LoadDatabaseConfig("mysql://tcp(service-mysql)/test")
db, _ := sql.Open(databaseConfig.Type, databaseConfig.Dsn)
schema, _ := config.LoadSchemaConfigFromFile("../tests/schema.yml")
dsns := []string{
@ -54,7 +52,9 @@ func TestAppRun(t *testing.T) {
// "postgres://postgres@tcp(service-postgres)/test",
}
for dns := range dsns {
for _, dsn := range dsns {
databaseConfig, _ := config.LoadDatabaseConfig(dsn)
db, _ := sql.Open(databaseConfig.Type, databaseConfig.Dsn)
app := App{}
app.Run(db, schema, faker.NewFakeManager(), databaseConfig)