GoogleCloudPlatform / GoogleCloudPlatform/gsutil
Unit tests should use GcsJsonApi instead of BotoTranslation
- Dominant language
- Python
- Stars
- 918
- Forks
- 335
- PR merge metrics
- No merged PRs in 30d
Description
The Class Map currently being used for [unit tests](https://github.com/GoogleCloudPlatform/gsutil/blob/0e0faf89474d591a4bd228775d4c9ac0f1ce5cbe/gslib/tests/testcase/unit_testcase.py#L75) for JSON is BotoTranslation. This is different from what we have in the [cs_api_map.GetClassMap](https://github.com/GoogleCloudPlatform/gsutil/blob/0e0faf89474d591a4bd228775d4c9ac0f1ce5cbe/gslib/cs_api_map.py#L57) method.
Instead of using a [custom method ](https://github.com/GoogleCloudPlatform/gsutil/blob/0e0faf89474d591a4bd228775d4c9ac0f1ce5cbe/gslib/tests/testcase/unit_testcase.py#L71) we should be directly using the [gslib.cs_api_map.GsutilApiClassMapFactory.GetClassMap](https://github.com/GoogleCloudPlatform/gsutil/blob/0e0faf89474d591a4bd228775d4c9ac0f1ce5cbe/gslib/cs_api_map.py#L53) in unit_testcase.py.
Doing this replacement is currently breaking a lot of unit tests which are currently relying on the BotoTranslation API even if we choose Json API. So making this change will also need fixing all the unit tests.
Contributor guide
Assessment
This issue has not been assessed yet.