sqldb: add helpers to create test DBs migrated up to a select version

This commit is contained in:
Andras Banki-Horvath committed 2024-07-09 08:39:57 +02:00
1 parent 5292c76e10
commit ed36598504
4 files changed
+88 -13

No files matched your search

+6
View File
@@ -11,3 +11,9 @@ import (
func NewTestDB(t *testing.T) *SqliteStore {
return NewTestSqliteDB(t)
}
// NewTestDBWithVersion is a helper function that creates an SQLite database
// for testing and migrates it to the given version.
func NewTestDBWithVersion(t *testing.T, version uint) *SqliteStore {
return NewTestSqliteDBWithVersion(t, version)
}