Skip to content

test: cover HttpApi authorization middleware#25033

Merged
kitlangton merged 1 commit into
devfrom
httpapi-authorization-middleware-tests
Apr 30, 2026
Merged

test: cover HttpApi authorization middleware#25033
kitlangton merged 1 commit into
devfrom
httpapi-authorization-middleware-tests

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Add a focused Effect HttpApi test for the authorization middleware using a tiny protected route.
  • Cover auth disabled, basic auth password checks, custom username, auth_token query credentials, and malformed token rejection.

Tests

  • bunx prettier --write packages/opencode/test/server/httpapi-authorization.test.ts
  • bunx oxlint packages/opencode/test/server/httpapi-authorization.test.ts
  • bun typecheck from packages/opencode
  • bun run test -- test/server/httpapi-authorization.test.ts
  • bun run test -- test/server/httpapi-authorization.test.ts test/server/httpapi-instance-context.test.ts test/server/httpapi-workspace-routing.test.ts test/server/workspace-proxy.test.ts
  • push hook: bun turbo typecheck

@kitlangton kitlangton enabled auto-merge (squash) April 30, 2026 01:34
@kitlangton kitlangton disabled auto-merge April 30, 2026 01:34
@kitlangton kitlangton merged commit 38adc13 into dev Apr 30, 2026
11 checks passed
@kitlangton kitlangton deleted the httpapi-authorization-middleware-tests branch April 30, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant