-
Notifications
You must be signed in to change notification settings - Fork 55
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
fix: client_info default values #681
Conversation
@@ -71,6 +71,23 @@ def modify_default_endpoint(client): | |||
) | |||
|
|||
|
|||
def test_logging_default_client_info_headers(): | |||
import re |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like repeated code - can you create one function controlled/operated by parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah unfortunately a lot of these test files contain mostly repeated test code pointed at different services. I considered making a different file for just these tests that could share more logic, but then decided to follow the existing conventions instead. Let me know if you think that makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you not plan to fix it in tests now, I guess lets open a bug and solve it later - lets keep a good standard to avoid code duplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please open a bug for code duplication cleanup
When client_info is not given to a new client, it now defaults to the values used by
self._connection._client_info
, rather than using None. This will allow the expected headers to be populated when using the grpc transportAlso added tests to ensure client_info is always set as expected in all classes
Fixes #680