googleapis / googleapis/google-cloud-python
google-auth: Clean up test coverage and outdated docstrings for mTLS and Identity Pool
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.8k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 122
Description
There are a few minor gaps in test coverage and test documentation that should be cleaned up in the `google-auth` library:
- In `tests/transport/test_aio_mtls_helper.py`, the docstring and comments for `test_get_client_cert_and_key_callback_sync` reference a `TypeError` fallback that is no longer used (the code now uses `inspect.isawaitable()`).
- The `MdsMtlsAdapter.close()` method in `google/auth/compute_engine/_mtls.py` lacks test coverage.
- There are several `RefreshError` exception paths in `google/auth/identity_pool.py` (specifically around leaf certificate retrieval and parsing) that are currently missing test coverage.
Contributor guide
Research direction
Start with tests/transport/test_aio_mtls_helper.py and update the docstring and comments for test_get_client_cert_and_key_callback_sync. Then inspect google/auth/compute_engine/_mtls.py and google/auth/identity_pool.py alongside their existing tests, covering MdsMtlsAdapter.close() and the noted RefreshError paths. Run the affected tests and confirm the outdated TypeError references are removed and the missing paths are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100