Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds client + unit-test support for the new GET /monitor/streams/quotas endpoint so users can retrieve stream quota definitions for the authenticated account.
Changes:
- Introduces a
StreamQuotamodel and aClient.ListStreamQuotaslist method for/monitor/streams/quotas. - Adds unit test coverage for listing stream quotas using a new JSON fixture.
- Adds a new unit-test fixture representing a paginated quotas response.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
monitor_log_streams.go |
Adds StreamQuota type and a client method to list quotas from monitor/streams/quotas. |
test/unit/monitor_logs_test.go |
Adds a unit test validating ListStreamQuotas parsing and behavior. |
test/unit/fixtures/monitor_log_streams_quotas_list.json |
Adds fixture data for the quotas list endpoint response. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
3bc1f96 to
f0a2062
Compare
| return doDELETERequest(ctx, c, e) | ||
| } | ||
|
|
||
| // ListLogStreamQuotas returns all quotas for the account. |
There was a problem hiding this comment.
Maybe we can make thing clearer by stating what type of quota it is? There are other kinds of quota in Linode API, which is not included in "all quotas" here.
154e80b to
105bdd2
Compare
105bdd2 to
a3d4847
Compare
…s-limit-per-account
yec-akamai
left a comment
There was a problem hiding this comment.
Can you add integration test to the new endpoint?
yec-akamai
left a comment
There was a problem hiding this comment.
I got the error when trying to run the test case and generate fixture. Do I need customer tags or something else to run it?
monitor_logs_test.go:586:
Error Trace: /Users/yechen/linode/linodego/test/integration/monitor_logs_test.go:586
Error: Received unexpected error:
[404] An error occurred
Test: TestLogStreamQuotas_List
Besides, can you generate and push the integration test fixtures? You can run this command to do so:
make TEST_ARGS="-run TestLogStreamQuotas_List" fixtures
📝 Description
Adds support for the GET /monitor/streams/quotas endpoint, which exposes stream quota definitions for the authenticated account.
✔️ How to Test
If the endpoint is available, run: