-
Notifications
You must be signed in to change notification settings - Fork 44
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
De-duplicate Integration Testing and Tracker Client Code #767
Comments
Relates to: #622 (comment) Hi @da2ce7 I wasn't sure if that is a good practice. I have the feeling we should move the client to another package and also primitives shared by the client and the server. However, I have to think deeply about it. The thing I don't like is tests could fail for two reasons: the client or the API endpoint. ChatGPTMoving your API client from test to production while maintaining reliability and ensuring comprehensive testing can indeed introduce some complexities. Your concerns about the potential for tests to fail due to issues with either the API itself or the client code are valid. Let’s explore the considerations and alternatives for managing this transition effectively. Considerations for Using the Same API Client in Testing and Production
Best Practices and Alternatives
ConclusionIn essence, it's a common practice to use the same API client code in both testing and production to ensure consistency and reduce duplication. However, it's crucial to employ testing strategies that effectively isolate components under test, use mocking where appropriate, and carefully manage the transition of changes from development to production to maintain system reliability. |
@da2ce7 |
part of:
src/shared/bit_torrent/tracker/http/client
is mostly a copy-paste of the infrastructure code for:tests/servers/http/
De-duplicating this code would mean that our client code would be tested with our integration tests.
The text was updated successfully, but these errors were encountered: