Skip to content

Add tests for edge3 worker API app and JWT auth - #72482

Merged
dheerajturaga merged 1 commit into
apache:mainfrom
dheerenmohta:fix-issue-72266
Sep 6, 2026
Merged

Add tests for edge3 worker API app and JWT auth#72482
dheerajturaga merged 1 commit into
apache:mainfrom
dheerenmohta:fix-issue-72266

Conversation

@dheerenmohta

Copy link
Copy Markdown
Contributor

Adds test coverage for the edge3 provider's worker API app factory and JWT authorization, which previously had none.

  • providers/edge3/tests/unit/edge3/worker_api/test_auth.py — method-claim matching/mismatch/missing JWT authorization, all 7 handled exception types collapsing into an anonymized 403 via _forbidden_response, jwt_validator() @cache semantics, jwt_leeway config plumbing, and the /edge_worker/v1/ prefix-stripping in jwt_token_authorization_rest.
  • providers/edge3/tests/unit/edge3/worker_api/test_app.pycreate_edge_worker_api_app(): v1-prefixed routers, ui-prefixed router, /static and /res StaticFiles mounts, and .cjs mimetype registration.
  • Removes the now-covered entries for these two files from the OVERLOOKED_TESTS allowlist in airflow-core/tests/unit/always/test_project_structure.py.

closes: #72266


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Sonnet 5)

Generated-by: Claude Code (Sonnet 5) following the guidelines

The FastAPI app factory and the JWT authorization layer for the Edge
Worker API had no dedicated unit tests, leaving the route/mount wiring
(v1 API prefix, UI prefix, static/res mounts, .cjs mimetype) and the
authorization flow (method-claim checks, per-exception anonymized 403
responses, validator caching semantics) unverified against regressions.

Closes: apache#72266
@boring-cyborg boring-cyborg Bot added area:providers provider:edge Edge Executor / Worker (AIP-69) / edge3 labels Sep 3, 2026
@dheerajturaga
dheerajturaga merged commit 6445ba5 into apache:main Sep 6, 2026
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:edge Edge Executor / Worker (AIP-69) / edge3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing tests for edge3 worker API app and auth

2 participants