fix(backend): harden final MVP invariants

This commit is contained in:
2026-07-22 01:24:41 +08:00
parent c527cd6ed0
commit 26c3e6fd8a
26 changed files with 684 additions and 179 deletions

View File

@@ -1,3 +1,5 @@
//go:build integration
package seed
import (
@@ -26,10 +28,8 @@ const (
)
func TestPostgresDemoSeedSerializesConcurrentRunsForSameOwner(t *testing.T) {
dsn := os.Getenv("DATABASE_URL")
if dsn == "" {
t.Skip("DATABASE_URL is not configured; skipping PostgreSQL seed concurrency test")
}
dsn := os.Getenv("TEST_DATABASE_URL")
require.NotEmpty(t, dsn, "TEST_DATABASE_URL is required for integration tests and must point to an isolated database")
database, err := gorm.Open(postgres.Open(dsn), &gorm.Config{
TranslateError: true,
Logger: logger.Default.LogMode(logger.Silent),