|
|
|
@ -40,23 +40,18 @@ func TestMain(m *testing.M) { |
|
|
|
dtmcli.GetRestyClient().OnAfterResponse(func(c *resty.Client, resp *resty.Response) error { return nil }) |
|
|
|
|
|
|
|
tenv := os.Getenv("TEST_STORE") |
|
|
|
conf.Store.Host = "localhost" |
|
|
|
conf.Store.Driver = tenv |
|
|
|
if tenv == "boltdb" { |
|
|
|
conf.Store.Driver = "boltdb" |
|
|
|
} else if tenv == "mysql" { |
|
|
|
conf.Store.Driver = "mysql" |
|
|
|
conf.Store.Host = "localhost" |
|
|
|
} else if tenv == config.Mysql { |
|
|
|
conf.Store.Port = 3306 |
|
|
|
conf.Store.User = "root" |
|
|
|
conf.Store.Password = "" |
|
|
|
} else if tenv == "postgres" { |
|
|
|
conf.Store.Driver = "postgres" |
|
|
|
conf.Store.Host = "localhost" |
|
|
|
} else if tenv == config.Postgres { |
|
|
|
conf.Store.Port = 5432 |
|
|
|
conf.Store.User = "postgres" |
|
|
|
conf.Store.Password = "mysecretpassword" |
|
|
|
} else { |
|
|
|
conf.Store.Driver = "redis" |
|
|
|
conf.Store.Host = "localhost" |
|
|
|
} else if tenv == config.Redis { |
|
|
|
conf.Store.User = "" |
|
|
|
conf.Store.Password = "" |
|
|
|
conf.Store.Port = 6379 |
|
|
|
|