Skip to content

test(bff): add unit tests to meet CI coverage threshold#13

Merged
golkity merged 12 commits into
devfrom
backend/bff/test
May 24, 2026
Merged

test(bff): add unit tests to meet CI coverage threshold#13
golkity merged 12 commits into
devfrom
backend/bff/test

Conversation

@golkity
Copy link
Copy Markdown
Contributor

@golkity golkity commented May 24, 2026

Description

This PR introduces the foundational test suite for the BFF service, raising the code coverage to meet the 80% threshold required by our CI pipeline.

What was tested

  • API Handlers: Added tests for the primary HTTP routes (e.g., /auth, /stream) using Axum's Router and tower::ServiceExt (oneshot requests) without spinning up a real network server.
  • Error Handling: Verified that AppError correctly maps to the expected HTTP status codes (e.g., 401 Unauthorized for InvalidCredentials).
  • Middleware (if applicable): Covered JWT validation and rate-limiting logic.

Note

The tests run entirely in memory and do not require active gRPC downstream services to pass.

Tip

Reviewers can run cargo llvm-cov test --all-features locally to see the exact lines covered by this PR.


by finnik

@golkity golkity self-assigned this May 24, 2026
@golkity golkity added the tests add test label May 24, 2026
@golkity golkity merged commit 4c21056 into dev May 24, 2026
4 checks passed
@golkity golkity deleted the backend/bff/test branch May 24, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests add test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant