aboutsummaryrefslogtreecommitdiffstats
path: root/internal/storage
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-03-10 20:15:04 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2024-03-10 20:15:04 -0400
commit62bacfb34dbea7ca88e22879a8d1699c79d58f97 (patch)
tree8b950c422d04866d9dd3681e0e595f9e16c4ea0e /internal/storage
parentAttempt to fix a couple flaky tests (diff)
downloadcli-62bacfb34dbea7ca88e22879a8d1699c79d58f97.zip
Tweak tests
Diffstat (limited to 'internal/storage')
-rw-r--r--internal/storage/db_test.go2
1 files changed, 2 insertions, 0 deletions
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!")