upd(tests): skip migrations in short mode, add t.Skip to crm
This commit is contained in:
@@ -11,8 +11,13 @@ import (
|
||||
)
|
||||
|
||||
func TestMigrations(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
return
|
||||
}
|
||||
|
||||
args := []string{
|
||||
// "--rm",
|
||||
"--rm",
|
||||
"-e", "MYSQL_ROOT_PASSWORD=root",
|
||||
"-e", "MYSQL_DATABASE=test",
|
||||
}
|
||||
|
||||
@@ -11,8 +11,13 @@ import (
|
||||
)
|
||||
|
||||
func TestMigrations(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
return
|
||||
}
|
||||
|
||||
args := []string{
|
||||
// "--rm",
|
||||
"--rm",
|
||||
"-e", "MYSQL_ROOT_PASSWORD=root",
|
||||
"-e", "MYSQL_DATABASE=test",
|
||||
}
|
||||
|
||||
@@ -9,6 +9,11 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
return
|
||||
}
|
||||
|
||||
// @todo this is a very optimistic initialization, make it more robust
|
||||
godotenv.Load("../../.env")
|
||||
|
||||
@@ -22,10 +27,6 @@ func TestMain(m *testing.M) {
|
||||
flag.StringVar(&dsn, p("db-dsn"), "crust:crust@tcp(db1:3306)/crust?collation=utf8mb4_general_ci", "DSN for database connection")
|
||||
flag.Parse()
|
||||
|
||||
if testing.Short() {
|
||||
return
|
||||
}
|
||||
|
||||
factory.Database.Add("default", dsn)
|
||||
|
||||
db := factory.Database.MustGet()
|
||||
|
||||
@@ -11,8 +11,13 @@ import (
|
||||
)
|
||||
|
||||
func TestMigrations(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
return
|
||||
}
|
||||
|
||||
args := []string{
|
||||
// "--rm",
|
||||
"--rm",
|
||||
"-e", "MYSQL_ROOT_PASSWORD=root",
|
||||
"-e", "MYSQL_DATABASE=test",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user