Skip to content

Create negative test cases for Pulse Metrics#818

Merged
psnoch-akamai merged 2 commits intolinode:mainfrom
psnoch-akamai:create-negative-test-cases-for-pulse-metrics-endpoints
Oct 7, 2025
Merged

Create negative test cases for Pulse Metrics#818
psnoch-akamai merged 2 commits intolinode:mainfrom
psnoch-akamai:create-negative-test-cases-for-pulse-metrics-endpoints

Conversation

@psnoch-akamai
Copy link
Contributor

@psnoch-akamai psnoch-akamai commented Sep 9, 2025

📝 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

@psnoch-akamai psnoch-akamai requested a review from a team as a code owner September 9, 2025 16:58
@psnoch-akamai psnoch-akamai requested review from jriddle-linode and vshanthe and removed request for a team September 9, 2025 16:58
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 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.

@psnoch-akamai psnoch-akamai force-pushed the create-negative-test-cases-for-pulse-metrics-endpoints branch 5 times, most recently from d4f5745 to fa8df9b Compare September 30, 2025 11:07
Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM works locally

Copy link
Contributor

@vshanthe vshanthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@psnoch-akamai psnoch-akamai force-pushed the create-negative-test-cases-for-pulse-metrics-endpoints branch 2 times, most recently from ddf1f59 to 2734bf6 Compare October 7, 2025 10:57
@psnoch-akamai psnoch-akamai force-pushed the create-negative-test-cases-for-pulse-metrics-endpoints branch from 2734bf6 to 9a6565d Compare October 7, 2025 11:39
@psnoch-akamai psnoch-akamai merged commit 3ed0466 into linode:main Oct 7, 2025
10 checks passed
@ezilber-akamai ezilber-akamai added the testing for updates to the testing suite in the changelog. label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants