Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend tests mock external services calls. #1358

Open
1 task
ianliuwk1019 opened this issue May 7, 2024 · 0 comments
Open
1 task

Backend tests mock external services calls. #1358

ianliuwk1019 opened this issue May 7, 2024 · 0 comments

Comments

@ianliuwk1019
Copy link
Collaborator

Some backend tests, (especially the test_router_[xyz] router tests), depending on the setup scenarios, can indirectly calls external services during testing.

Other than the tests really are testing on external services integration, for other tests that are only for FAM system business rules, we should find a way to mock the external service calls and return expected mock objects depending on tests needs. That will improve testing speed, avoid coupling and relying on external services for test passing, and also avoid using real "number/id" or "user credential" for setting up tests (security and privacy reason).

So far the external services includes:

  • integration/forest_client
  • integration/idim_proxy
  • integraiton/gc_notify (not being used yet)

Just a thought: This tasks might somewhat tricky or hidden on finding what external services is/are being used in tests scenarios, we can focus on just for mocking first the "forest_cliet" service.

Acceptance Criteria

  • Mock the external service calls (indirectly) for tests so they don't call external services.

Additional context

  • Add any other context about the task here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant