googleapis / googleapis/google-cloud-python

google-auth: Clean up test coverage and outdated docstrings for mTLS and Identity Pool

Aperta
#17,758 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
auth effort: low priority: p3 testing type: cleanup
Lingua principale
Python
Stelle
5.4k
Fork
1.8k
Merge medio
3g 4h
PR unite (30g)
122

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
testing
Tipo di issue
Refactoring
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
74/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.