Commit 82757fb
test(webapp): delete dead authorization.test.ts, update batch e2e to match backwards-compat fix
Two CI failures on PR #3499:
1. Shard 7 — `test/authorization.test.ts` failed at module load with
"Cannot find module '../app/services/authorization.server'". That
module was deleted in 18e0701 (the entire `checkAuthorization`
function went with the apiBuilder migration), but I missed the
test file that exercised it — the earlier grep for live consumers
only walked `app/`, not `test/`. The test was unit coverage for
the now-deleted function; nothing else worth saving in it. Delete.
2. E2E auth — `JWT read:runs: 403 (resource type is 'batch', not 'runs')`
was asserting the strict-match behaviour that 9f987ae deliberately
reverted for backwards compat (batch retrieve routes wrap
`{type: "batch", id}` in anyResource([...]) alongside `{type: "runs"}`
so JWTs minted with read:runs against batch endpoints keep working).
The test caught my own intentional change. Update the expectation:
`read:runs` JWT should now pass (not be 403), and rename the test to
reflect the new behaviour with a comment pointing at the
backwards-compat rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 704b072 commit 82757fb
2 files changed
Lines changed: 11 additions & 431 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1681 | 1681 | | |
1682 | 1682 | | |
1683 | 1683 | | |
1684 | | - | |
| 1684 | + | |
1685 | 1685 | | |
1686 | 1686 | | |
1687 | 1687 | | |
1688 | 1688 | | |
1689 | 1689 | | |
1690 | 1690 | | |
1691 | 1691 | | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
1699 | 1702 | | |
1700 | 1703 | | |
1701 | 1704 | | |
| |||
0 commit comments