From 1a7fd85f4bf6f4590c3880a08065caa248bbd1c1 Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Wed, 9 Sep 2026 04:56:07 -0700 Subject: [PATCH] feat: drop the throwaway migration harness that a blanket git add swept into the placement commit, since it only existed to apply migrations against a scratch database while verifying the branch --- internal/infrastructure/db/zz_tmp_test.go | 38 ----------------------- 1 file changed, 38 deletions(-) delete mode 100644 internal/infrastructure/db/zz_tmp_test.go diff --git a/internal/infrastructure/db/zz_tmp_test.go b/internal/infrastructure/db/zz_tmp_test.go deleted file mode 100644 index 3c9fe89f..00000000 --- a/internal/infrastructure/db/zz_tmp_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package db - -import ( - "errors" - "os" - "testing" - - "github.com/golang-migrate/migrate/v4" - "github.com/golang-migrate/migrate/v4/source/iofs" -) - -func inst(t *testing.T) *migrate.Migrate { - dsn := os.Getenv("MIG_DSN") - if dsn == "" { - t.Skip("no dsn") - } - src, _ := iofs.New(migrationsFS, "migrations") - m, err := migrate.NewWithSourceInstance("iofs", src, dsn) - if err != nil { - t.Fatal(err) - } - return m -} - -func TestTmpUpDown(t *testing.T) { - m := inst(t) - defer m.Close() - if err := m.Up(); err != nil && !errors.Is(err, migrate.ErrNoChange) { - t.Fatal("up:", err) - } - // Both new migrations must round-trip. - if err := m.Steps(-2); err != nil { - t.Fatal("down 2:", err) - } - if err := m.Steps(2); err != nil { - t.Fatal("re-up 2:", err) - } -}