Skip to content

Conversation

@g2vinay
Copy link
Contributor

@g2vinay g2vinay commented Dec 20, 2025

Migrates EventGrid live tests to recorded framework.
Resolves #1284

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 migrates EventGrid live tests to use the recorded test framework, enabling test recording and playback functionality for improved test reliability and CI/CD performance.

Key Changes:

  • Converted test class from CommandTestsBase to RecordedCommandTestsBase with test proxy fixture support
  • Added deterministic test data using RegisterOrRetrieveVariable for all time-based and GUID values
  • Implemented optional IHttpClientFactory injection to enable test proxy recording for EventGrid publisher clients

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.EventGrid/tests/Azure.Mcp.Tools.EventGrid.LiveTests/assets.json Added assets configuration file for test recordings repository integration
tools/Azure.Mcp.Tools.EventGrid/tests/Azure.Mcp.Tools.EventGrid.LiveTests/EventGridCommandTests.cs Migrated test class to RecordedCommandTestsBase, added sanitizers for sensitive data, and made all tests deterministic
tools/Azure.Mcp.Tools.EventGrid/src/Services/IEventGridService.cs Added optional IHttpClientFactory parameter to PublishEventAsync method signature
tools/Azure.Mcp.Tools.EventGrid/src/Services/EventGridService.cs Implemented logic to use IHttpClientFactory when provided to create test proxy-aware EventGrid publisher clients
tools/Azure.Mcp.Tools.EventGrid/src/Commands/Events/EventsPublishCommand.cs Added logic to optionally retrieve and pass IHttpClientFactory to the service layer

@g2vinay g2vinay requested a review from a team as a code owner December 20, 2025 06:35
@g2vinay g2vinay force-pushed the migrate-eventgrid-to-recorded-tests branch from 7ddceed to 3f6a56e Compare December 20, 2025 06:54
@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Jan 6, 2026
@g2vinay g2vinay merged commit aff0b39 into microsoft:main Jan 6, 2026
24 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Migrate Azure.Mcp.Tools.EventGrid.LiveTests LiveTests to Recorded Tests

2 participants