TPT-4224: Add OBJ global quota and usage#899
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive support for Object Storage quotas in the Linode Go SDK, including both endpoint-specific quotas and new global/account-level quotas. The changes extend the existing quota system with new fields and introduce a parallel set of APIs for global quotas.
Changes:
- Added
QuotaTypeandHasUsagefields toObjectStorageQuotastruct to support new quota metadata - Introduced
ObjectStorageGlobalQuotaandObjectStorageGlobalQuotaUsagetypes with corresponding List/Get methods for account-level quotas - Updated integration tests to validate the new fields and created comprehensive tests for global quota operations
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| object_storage_quota.go | Added QuotaType and HasUsage fields to ObjectStorageQuota; introduced ObjectStorageGlobalQuota and ObjectStorageGlobalQuotaUsage types with List/Get/GetUsage methods |
| test/integration/object_storage_quota_test.go | Updated tests to use flexible assertions for new fields instead of hard-coded expected values |
| test/integration/object_storage_global_quota_test.go | Added comprehensive tests for global quota List, Get, and Usage operations |
| test/integration/fixtures/TestObjectStorageQuotas_List.yaml | Updated fixture with new API response format including quota_type and has_usage fields |
| test/integration/fixtures/TestObjectStorageQuotas_Get.yaml | Updated fixture to include quota_type and has_usage fields |
| test/integration/fixtures/TestObjectStorageGlobalQuotas_List.yaml | New fixture for global quotas list endpoint |
| test/integration/fixtures/TestObjectStorageGlobalQuotas_Get.yaml | New fixture for global quota get endpoint |
| test/integration/fixtures/TestObjectStorageGlobalQuotaUsage_Get.yaml | New fixture for global quota usage endpoint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ezilber-akamai
left a comment
There was a problem hiding this comment.
Tests passing locally. Nice work!
ckulinsk
left a comment
There was a problem hiding this comment.
Tests passing locally, looks good to me.
ckulinsk
left a comment
There was a problem hiding this comment.
Looks, good to me, and tests passed locally - approved.
📝 Description
Support updates about OBJ quotas
✔️ How to Test
make TEST_ARGS="-run TestObjectStorageQuotas_Get" fixturesmake TEST_ARGS="-run TestObjectStorageQuotas_List" fixtures