diff --git a/lib/gorm-goose/dbconf_test.go b/lib/gorm-goose/dbconf_test.go index 34200af..ebdf006 100644 --- a/lib/gorm-goose/dbconf_test.go +++ b/lib/gorm-goose/dbconf_test.go @@ -13,7 +13,7 @@ func TestBasics(t *testing.T) { } got := []string{dbconf.MigrationsDir, dbconf.Env, dbconf.Driver.Name, dbconf.Driver.OpenStr} - want := []string{"../../db-sample/migrations", "test", "postgres", "user=liam dbname=tester sslmode=disable"} + want := []string{"../../db-sample/migrations", "test", "mysql", "user:password@/dbname?charset=utf8&parseTime=True&loc=Local"} for i, s := range got { if s != want[i] { @@ -22,20 +22,6 @@ func TestBasics(t *testing.T) { } } -func TestImportOverride(t *testing.T) { - - dbconf, err := NewDBConf("../../db-sample", "customimport", "") - if err != nil { - t.Fatal(err) - } - - got := dbconf.Driver.Import - want := "github.com/custom/driver" - if got != want { - t.Errorf("bad custom import. got %v want %v", got, want) - } -} - func TestDriverSetFromEnvironmentVariable(t *testing.T) { databaseUrlEnvVariableKey := "DB_DRIVER" diff --git a/lib/gorm-goose/migration_go.go b/lib/gorm-goose/migration_go.go index 4bb70ca..8f2ad5b 100644 --- a/lib/gorm-goose/migration_go.go +++ b/lib/gorm-goose/migration_go.go @@ -97,7 +97,7 @@ import ( "encoding/gob" _ "{{.Import}}" - "github.com/Altoros/gorm-goose/lib/goose" + goose "github.com/Altoros/gorm-goose/lib/gorm-goose" ) func main() {