fix: close business flow regressions
This commit is contained in:
18
backend/api/cmd/cli/main_test.go
Normal file
18
backend/api/cmd/cli/main_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gorm.io/driver/sqlite"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func TestPrepareAdditiveMigrationsSkipsMissingLegacyTable(t *testing.T) {
|
||||
databaseService, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
|
||||
if err != nil {
|
||||
t.Fatalf("open sqlite database: %v", err)
|
||||
}
|
||||
if err := prepareAdditiveMigrations(databaseService, "postgres"); err != nil {
|
||||
t.Fatalf("missing legacy table should not require a backfill: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user