-
Notifications
You must be signed in to change notification settings - Fork 96
Fix Multiple ACLP Alerting Issues #873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses issues found in a previous pull request by cleaning up the monitor alert definitions implementation. The changes focus on removing unnecessary API version handling, standardizing test naming, updating type definitions to use pointers for optional fields, and simplifying endpoint construction logic.
- Removed beta endpoint registration logic from unit test mocking methods
- Converted optional struct fields to pointers in AlertDefinitionCreateOptions and AlertDefinitionUpdateOptions
- Renamed test functions to follow consistent naming conventions
- Simplified ListMonitorAlertDefinitions endpoint construction
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/unit/base.go | Removed beta endpoint registration logic and unused strings import from mock HTTP methods |
| test/integration/monitor_alert_definitions_test.go | Updated tests to use pointer types for optional fields, removed API version calls, renamed tests to follow naming conventions, and updated function calls to use ListAllMonitorAlertDefinitions |
| test/integration/fixtures/TestMonitorAlertDefinitions_List.yaml | New fixture file for the renamed TestMonitorAlertDefinitions_List test |
| test/integration/fixtures/TestMonitorAlertDefinition_Smoke.yaml | New fixture file for the renamed TestMonitorAlertDefinition_smoke test |
| test/integration/fixtures/TestMonitorAlertDefinition_CreateWithIdempotency.yaml | New fixture file for the renamed TestMonitorAlertDefinition_CreateWithIdempotency test |
| test/integration/fixtures/TestMonitorAlertChannels_List.yaml | New fixture file for the renamed TestMonitorAlertChannels_List test |
| monitor_alert_definitions.go | Changed optional fields to pointer types in AlertDefinitionCreateOptions and AlertDefinitionUpdateOptions structs, simplified endpoint construction in ListMonitorAlertDefinitions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yec-akamai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing these issues!
📝 Description
This is to clean up the issues found in #824
One remaining but less urgent issue is that the cleanup logic of the tests should wrapped in a function and called via
t.Cleanup(someFunction())ordefer someFunction().✔️ How to Test
make TEST_ARGS="-run TestMonitorAlert" fixtures