Skip to content

Conversation

@zliang-akamai
Copy link
Member

@zliang-akamai zliang-akamai commented Dec 22, 2025

📝 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()) or defer someFunction().

✔️ How to Test

make TEST_ARGS="-run TestMonitorAlert" fixtures

Copilot AI review requested due to automatic review settings December 22, 2025 21:46
@zliang-akamai zliang-akamai requested a review from a team as a code owner December 22, 2025 21:46
@zliang-akamai zliang-akamai requested review from ezilber-akamai and vshanthe and removed request for a team December 22, 2025 21:46
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

@yec-akamai yec-akamai left a 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!

@zliang-akamai zliang-akamai added the bugfix for any bug fixes in the changelog. label Dec 26, 2025
@zliang-akamai zliang-akamai merged commit f76ae6d into main Dec 26, 2025
10 checks passed
@zliang-akamai zliang-akamai deleted the zhiwei/aclp-fix branch December 26, 2025 16:42
@zliang-akamai zliang-akamai changed the title ACLP Fix Fix Multiple ACLP Alerting Issues Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix for any bug fixes in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants