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

Add tests #2

Open
4 tasks
nikhil-prabhu opened this issue Nov 4, 2023 · 0 comments
Open
4 tasks

Add tests #2

nikhil-prabhu opened this issue Nov 4, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nikhil-prabhu
Copy link
Owner

The crate is currently manually tested for correctness. While manual testing is required in our case to ensure that the providers are correctly detected in real-world scenarios, unit tests should also be added for testing functional and logical correctness.

Current blockers

  • The methods that check the provider metadata servers make real HTTP requests to third party URLs. We need a way to mock/patch this as these requests won't work in unit tests.
  • The methods that check the provider vendor files must be mocked/patched as the vendor files won't actually exist in our test environment.
  • mockall seems like a good option for now for mocking. However, writing unit tests using mocks doesn't provide code coverage.
  • guerrilla seems promising for monkey patching our methods (and also provides code coverage), but doesn't seem to be working fully as expected in my limited testing.
@nikhil-prabhu nikhil-prabhu added enhancement New feature or request help wanted Extra attention is needed labels Nov 4, 2023
@nikhil-prabhu nikhil-prabhu self-assigned this Nov 4, 2023
@nikhil-prabhu nikhil-prabhu pinned this issue Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant