Create negative test cases for Pulse Metrics#818
Merged
psnoch-akamai merged 2 commits intolinode:mainfrom Oct 7, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds negative test cases for Pulse Metrics functionality to improve test coverage by validating error handling scenarios.
- Adds tests for invalid dashboard ID requests and invalid service type lookups
- Adds test for token creation with non-existent entity IDs
- Verifies proper error messages and HTTP status codes are returned for invalid requests
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/integration/monitor_dashboards_test.go | Adds negative test for GetMonitorDashboard with non-existent dashboard ID |
| test/integration/monitor_services_test.go | Adds negative test for ListMonitorServiceByType with invalid service type |
| test/integration/monitor_services_token_creation_test.go | Adds negative test for CreateMonitorServiceTokenForServiceType with invalid entity ID |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
d4f5745 to
fa8df9b
Compare
jriddle-linode
approved these changes
Oct 2, 2025
Collaborator
jriddle-linode
left a comment
There was a problem hiding this comment.
LGTM works locally
ddf1f59 to
2734bf6
Compare
2734bf6 to
9a6565d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Adds negative test cases for Pulse Metrics.
✔️ How to Test
go test -run TestMonitorDashboards_GetNotExistingDashboardID
go test -run TestMonitorServices_GetNotAllowedServiceType
go test -run TestMonitorServicesTokenCreation_TryCreateTokenWithInvalidEntityID