From cde3cfc30d337243eb2e2553744f233a9e3193ac Mon Sep 17 00:00:00 2001 From: Dale Hui Date: Thu, 20 Jun 2019 23:48:13 -0700 Subject: [PATCH] Fix broken sqlite tests Since v4.3.0, Migrate.Drop() no longer recreates the migrate schema version table. See: https://github.com/golang-migrate/migrate/releases/tag/v4.3.0 --- database/sqlite3/sqlite3_test.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/database/sqlite3/sqlite3_test.go b/database/sqlite3/sqlite3_test.go index 3c3f24d..fa527f5 100644 --- a/database/sqlite3/sqlite3_test.go +++ b/database/sqlite3/sqlite3_test.go @@ -45,12 +45,6 @@ func TestMigrate(t *testing.T) { } }() t.Logf("DB path : %s\n", filepath.Join(dir, "sqlite3.db")) - p := &Sqlite{} - addr := fmt.Sprintf("sqlite3://%s", filepath.Join(dir, "sqlite3.db")) - d, err := p.Open(addr) - if err != nil { - t.Fatal(err) - } db, err := sql.Open("sqlite3", filepath.Join(dir, "sqlite3.db")) if err != nil { @@ -65,9 +59,6 @@ func TestMigrate(t *testing.T) { if err != nil { t.Fatal(err) } - if err := d.Drop(); err != nil { - t.Fatal(err) - } m, err := migrate.NewWithDatabaseInstance( "file://./examples/migrations",