| 1 | package boot |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "reasonix/internal/config" |
| 7 | ) |
| 8 | |
| 9 | func TestRuntimeConfigFingerprintIgnoresUploadAdmissionPolicy(t *testing.T) { |
| 10 | isolateConfigHome(t) |
| 11 | t.Setenv("REASONIX_PROJECTION_TEST_KEY", "fixture-key") |
| 12 | cfg := projectionConfig(t) |
| 13 | before := runtimeConfigFingerprint(cfg) |
| 14 | if before == "" { |
| 15 | t.Fatal("fixture has no reusable runtime fingerprint") |
| 16 | } |
| 17 | for _, limit := range []int64{8, 0, config.DefaultAttachmentStreamBytes, -1} { |
| 18 | cfg.Attachments.MaxStreamBytes = &limit |
| 19 | if got := runtimeConfigFingerprint(cfg); got != before { |
| 20 | t.Fatalf("upload ceiling %d invalidated controller reuse", limit) |
| 21 | } |
| 22 | } |
| 23 | cfg.Attachments.MaxStreamBytes = nil |
| 24 | if got := runtimeConfigFingerprint(cfg); got != before { |
| 25 | t.Fatal("restoring the default upload ceiling invalidated controller reuse") |
| 26 | } |
| 27 | } |
| 28 |