From c1f0a1a04441f8508826792616a6cb0f65968283 Mon Sep 17 00:00:00 2001 From: mattes Date: Fri, 17 Oct 2014 11:50:39 -0700 Subject: [PATCH] fix mysql --- driver/mysql/mysql_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/mysql/mysql_test.go b/driver/mysql/mysql_test.go index 9b69c95..2393b7b 100644 --- a/driver/mysql/mysql_test.go +++ b/driver/mysql/mysql_test.go @@ -5,6 +5,7 @@ import ( "github.com/mattes/migrate/file" "github.com/mattes/migrate/migrate/direction" pipep "github.com/mattes/migrate/pipe" + "strings" "testing" ) @@ -14,7 +15,7 @@ func TestMigrate(t *testing.T) { driverUrl := "mysql://root@tcp(127.0.0.1:3306)/migratetest" // prepare clean database - connection, err := sql.Open("mysql", driverUrl) + connection, err := sql.Open("mysql", strings.SplitN(driverUrl, "mysql://", 2)[1]) if err != nil { t.Fatal(err) }