aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/repositories/migration_db_repo_test.go1
-rw-r--r--internal/storage/db_test.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/internal/repositories/migration_db_repo_test.go b/internal/repositories/migration_db_repo_test.go
index d54fb24..2a316c9 100644
--- a/internal/repositories/migration_db_repo_test.go
+++ b/internal/repositories/migration_db_repo_test.go
@@ -124,6 +124,7 @@ func TestApply(t *testing.T) {
t.Cleanup(func() {
bolttest.DropTable(t, testdb, "tmp")
})
+ bolttest.DropTable(t, testdb, "tmp")
migration := models.NewTimestampMigration(time.Now(), "test")
err = repo.Apply(`CREATE TABLE tmp(id INT NOT NULL PRIMARY KEY)`, migration)
diff --git a/internal/storage/db_test.go b/internal/storage/db_test.go
index 949ab52..4b7dc93 100644
--- a/internal/storage/db_test.go
+++ b/internal/storage/db_test.go
@@ -114,6 +114,7 @@ func TestTx_Commit(t *testing.T) {
bolttest.DropTable(t, db, "tmp")
assert.Nil(t, db.Close())
})
+ bolttest.DropTable(t, db, "tmp")
err = db.Tx(func(db storage.DB) error {
_, err = db.Exec(`CREATE TABLE tmp(id int primary key);`)
@@ -135,6 +136,7 @@ func TestTx_Rollback(t *testing.T) {
bolttest.DropTable(t, db, "tmp")
assert.Nil(t, db.Close())
})
+ bolttest.DropTable(t, db, "tmp")
_, err = db.Exec(`CREATE TABLE tmp(id INT PRIMARY KEY);`)
assert.Nil(t, err)
expectedErr := errors.New("error!")