googleapis / googleapis/google-cloud-python

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

Đang mở
#17,758 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
auth effort: low priority: p3 testing type: cleanup
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
testing
Loại issue
Tái cấu trúc
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
74/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.