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

Mocking external APIs #187

Closed
gmazoyer opened this issue Nov 28, 2019 · 0 comments
Closed

Mocking external APIs #187

gmazoyer opened this issue Nov 28, 2019 · 0 comments
Assignees
Labels
type: housekeeping Non-blocking task but helps to keep the code clean

Comments

@gmazoyer
Copy link
Member

Proposed Changes

Avoid querying external APIs such as PeeringDB or NetBox by mocking them during unit tests.

Justification

Mocking API while unit tests are running has the following advantages:

  • Avoid network traffic toward external servers (requiring an Internet connection)
  • Avoid test failing due to production data changing in APIs
  • Improve testing speed
@gmazoyer gmazoyer added the type: housekeeping Non-blocking task but helps to keep the code clean label Nov 28, 2019
@gmazoyer gmazoyer self-assigned this Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: housekeeping Non-blocking task but helps to keep the code clean
Projects
None yet
Development

No branches or pull requests

1 participant