diff --git a/itest/scenarios_test.go b/itest/scenarios_test.go index ba1b01d..148fdbb 100644 --- a/itest/scenarios_test.go +++ b/itest/scenarios_test.go @@ -290,9 +290,14 @@ func TestForgeScenarios(t *testing.T) { return resp } + // Any 2xx is a successful preflight per the fetch spec; versitygw + // answers a matched rule 200 and only its no-CORS-config fallback + // 204. The Max-Age assertion below is what pins the real path — the + // fallback sets no Max-Age and mirrors the requested method instead + // of the rule's method list. resp := preflight(t, origin) - if resp.StatusCode != http.StatusNoContent { - t.Errorf("preflight status = %d, want 204", resp.StatusCode) + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + t.Errorf("preflight status = %d, want 2xx", resp.StatusCode) } if got := resp.Header.Get("Access-Control-Allow-Origin"); got != origin { t.Errorf("preflight Allow-Origin = %q, want the request origin echoed", got) diff --git a/itest/stack_test.go b/itest/stack_test.go index 2e6184c..c1f9ec6 100644 --- a/itest/stack_test.go +++ b/itest/stack_test.go @@ -104,7 +104,9 @@ func forgeStack(t *testing.T, extra ...stack.Option) (*stack.Stack, string) { t.Helper() t.Logf("booting the smelt Forge stack (~1-2 min; first run also compiles ingot and pulls images)") opts := []stack.Option{ - stack.WithPiriNodes(stack.PiriNodeConfig{}), + // Postgres-backed piri: piri:main's curio PDP pipeline refuses + // sqlite ("curio PDP pipeline requires Postgres") as of 2026-07-24. + stack.WithPiriNodes(stack.PiriNodeConfig{Postgres: true}), stack.WithServiceBinary("ingot", localIngotBinary(t)), } // Local-dev escape hatches: run against upload-service (sprue) / piri