Merge pull request 'test: postgres harness no longer provisions at the live stage Prüfwerk' (#108) from fix/tests-no-stage-calls into main
ci / shared (push) Successful in 15s
ci / test (push) Successful in 27m10s
ci / image (push) Successful in 40s

This commit was merged in pull request #108.
This commit is contained in:
sharang committed 2026-10-30 07:58:35 +00:00
commit 1691bf1be3
1 file changed
+8
+8
View File
@@ -116,6 +116,14 @@ func newPostgresHarness(t *testing.T) *testHarness {
if err := m.Up(); err != nil && err.Error() != "no change" {
t.Fatalf("migrate: %v", err)
}
// The migrations seed the real product URLs (0005: Prüfwerk's stage
// provision endpoint), and a test config's env "dev" reads as "stage":
// without this, every test that provisions a tenant called the live
// pruefwerk-stage with the mock's non-JWT token (401s in its log). The
// memory store has no provision URLs either; tests that need one set it.
if _, err := db.ExecContext(ctx, `UPDATE products SET provision_urls = '{}'`); err != nil {
t.Fatalf("clear provision URLs: %v", err)
}
_, _ = m.Close()
_ = db.Close()