fix(handlers/org_helpers_test): use t.Fatal instead of t.Error in error-path tests #970
Merged
devops-engineer
merged 1 commits from 2026-05-14 05:29:48 +00:00
fix/org-helpers-test-panic into main
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 95c62c6fcd |
fix(handlers/org_helpers_test): use t.Fatal instead of t.Error in error-path tests
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 21s
CI / Detect changes (pull_request) Successful in 57s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m10s
Harness Replays / detect-changes (pull_request) Successful in 18s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m0s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 20s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m1s
qa-review / approved (pull_request) Successful in 16s
gate-check-v3 / gate-check (pull_request) Successful in 29s
security-review / approved (pull_request) Successful in 16s
sop-checklist / all-items-acked (pull_request) Successful in 17s
sop-tier-check / tier-check (pull_request) Successful in 15s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m14s
audit-force-merge / audit (pull_request) Successful in 16s
CI / Canvas (Next.js) (pull_request) Successful in 7s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
CI / Python Lint & Test (pull_request) Successful in 7s
Harness Replays / Harness Replays (pull_request) Successful in 6s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m42s
CI / Canvas Deploy Reminder (pull_request) Successful in 7s
CI / Platform (Go) (pull_request) Failing after 4m12s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 4m56s
CI / all-required (pull_request) Successful in 5s
Six resolveInsideRoot tests called t.Errorf then continued to err.Error() on a potentially-nil error — if err was unexpectedly nil, the subsequent err.Error() call would panic with nil pointer dereference. Fix: use t.Fatalf/t.Fatal in the nil-error branch so execution stops before the err.Error() call. Affects: - TestResolveInsideRoot_EmptyUserPath - TestResolveInsideRoot_AbsolutePathRejected - TestResolveInsideRoot_DotDotTraversal - TestResolveInsideRoot_DotDotWithIntermediate - TestResolveInsideRoot_NestedDotDotEscapes - TestResolveInsideRoot_DotdotAtStart Fixes regression reported in issue #965. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |