Skip to content

Conversation

@scbedd
Copy link
Contributor

@scbedd scbedd commented Dec 17, 2025

Resolves #1292

… the newing that is being exercised in the construction of the test isn't actually used for anything. the product commands ARE though
@scbedd scbedd marked this pull request as ready for review December 17, 2025 23:51
Copilot AI review requested due to automatic review settings December 17, 2025 23:51
@scbedd scbedd requested review from a team and meirloichter as code owners December 17, 2025 23:51
@scbedd scbedd self-assigned this Dec 17, 2025
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 the Marketplace tool's live tests to use the recorded test infrastructure, enabling test playback without requiring live Azure resources.

Key Changes

  • Converted test classes to inherit from RecordedCommandTestsBase instead of CommandTestsBase
  • Added test recording infrastructure via assets.json configuration file
  • Updated MarketplaceService to properly use HttpClient through the Azure Core pipeline for recording support

Reviewed changes

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

File Description
tools/Azure.Mcp.Tools.Marketplace/tests/Azure.Mcp.Tools.Marketplace.LiveTests/assets.json Added assets.json configuration file for test recording infrastructure with appropriate TagPrefix and repository settings
tools/Azure.Mcp.Tools.Marketplace/tests/Azure.Mcp.Tools.Marketplace.LiveTests/ProductListCommandTests.cs Refactored test class to use RecordedCommandTestsBase with primary constructor, removed manual service instantiation, made class sealed
tools/Azure.Mcp.Tools.Marketplace/tests/Azure.Mcp.Tools.Marketplace.LiveTests/ProductGetCommandTests.cs Refactored test class to use RecordedCommandTestsBase with primary constructor, removed manual service instantiation, made class sealed
tools/Azure.Mcp.Tools.Marketplace/src/Services/MarketplaceService.cs Updated HTTP request handling to use proper resource disposal patterns with using statements for HttpClient, request, and response objects

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Dec 18, 2025
@scbedd scbedd merged commit d52e8ae into microsoft:main Dec 18, 2025
30 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Dec 18, 2025
ankushbindlish2 added a commit that referenced this pull request Dec 19, 2025
* Fix versions in Fabric changelog and add debug text to script (#1391)

* Remove unnecessary build targets and resources (#1375)

* Move azure icon to images folder
* Remove duplicate resources and unnecessary build targets
* Remove unnecessary reference to eng/dnx from pack-nuget

* Prevent HashTable.Count from affecting result count check (#1397)

* Migrate Authorization to recordings (#1399)

* Fix execution of parallel testclasses within testassembly (#1393)

* assets.json longer optional
* changes to prevent multiple proxy instances from restoring simultaneously

* Fabric MCP: Add OneLake namespace to VSCode options (#1398)

* Fabric MCP: Add OneLake namespace to VSCode options

* Update descriptions

* Increment versions and update CHANGELOGs after release (#1371)

Updated CHANGELOGs and project version after release

* Migrate `marketplace` to recordings (#1396)

* simplify the client creation a bit, remove unnecessary test parts, as the newing that is being exercised in the construction of the test isn't actually used for anything. the product commands ARE though

* Migrate AKS to recordings (#1384)

* Migrate AKS to recordings

* Fix linting, synchronize starting proxy

* Revert lock change

---------

Co-authored-by: Scott Beddall (from Dev Box) <[email protected]>

* Migrate Function App to recordings (#1410)

---------

Co-authored-by: Patrick Hallisey <[email protected]>
Co-authored-by: Alan Zimmer <[email protected]>
Co-authored-by: Scott Beddall <[email protected]>
Co-authored-by: Amos Hersch <[email protected]>
Co-authored-by: vcolin7 <[email protected]>
Co-authored-by: Scott Beddall (from Dev Box) <[email protected]>
ankushbindlish2 added a commit that referenced this pull request Dec 19, 2025
* Fix versions in Fabric changelog and add debug text to script (#1391)

* Remove unnecessary build targets and resources (#1375)

* Move azure icon to images folder
* Remove duplicate resources and unnecessary build targets
* Remove unnecessary reference to eng/dnx from pack-nuget

* Prevent HashTable.Count from affecting result count check (#1397)

* Migrate Authorization to recordings (#1399)

* Fix execution of parallel testclasses within testassembly (#1393)

* assets.json longer optional
* changes to prevent multiple proxy instances from restoring simultaneously

* Fabric MCP: Add OneLake namespace to VSCode options (#1398)

* Fabric MCP: Add OneLake namespace to VSCode options

* Update descriptions

* Increment versions and update CHANGELOGs after release (#1371)

Updated CHANGELOGs and project version after release

* Migrate `marketplace` to recordings (#1396)

* simplify the client creation a bit, remove unnecessary test parts, as the newing that is being exercised in the construction of the test isn't actually used for anything. the product commands ARE though

* Migrate AKS to recordings (#1384)

* Migrate AKS to recordings

* Fix linting, synchronize starting proxy

* Revert lock change

---------

Co-authored-by: Scott Beddall (from Dev Box) <[email protected]>

* Migrate Function App to recordings (#1410)

---------

Co-authored-by: Patrick Hallisey <[email protected]>
Co-authored-by: Alan Zimmer <[email protected]>
Co-authored-by: Scott Beddall <[email protected]>
Co-authored-by: Amos Hersch <[email protected]>
Co-authored-by: vcolin7 <[email protected]>
Co-authored-by: Scott Beddall (from Dev Box) <[email protected]>
ankushbindlish2 added a commit that referenced this pull request Dec 19, 2025
* Fix versions in Fabric changelog and add debug text to script (#1391)

* Remove unnecessary build targets and resources (#1375)

* Move azure icon to images folder
* Remove duplicate resources and unnecessary build targets
* Remove unnecessary reference to eng/dnx from pack-nuget

* Prevent HashTable.Count from affecting result count check (#1397)

* Migrate Authorization to recordings (#1399)

* Fix execution of parallel testclasses within testassembly (#1393)

* assets.json longer optional
* changes to prevent multiple proxy instances from restoring simultaneously

* Fabric MCP: Add OneLake namespace to VSCode options (#1398)

* Fabric MCP: Add OneLake namespace to VSCode options

* Update descriptions

* Increment versions and update CHANGELOGs after release (#1371)

Updated CHANGELOGs and project version after release

* Migrate `marketplace` to recordings (#1396)

* simplify the client creation a bit, remove unnecessary test parts, as the newing that is being exercised in the construction of the test isn't actually used for anything. the product commands ARE though

* Migrate AKS to recordings (#1384)

* Migrate AKS to recordings

* Fix linting, synchronize starting proxy

* Revert lock change

---------

Co-authored-by: Scott Beddall (from Dev Box) <[email protected]>

* Migrate Function App to recordings (#1410)

---------

Co-authored-by: Patrick Hallisey <[email protected]>
Co-authored-by: Alan Zimmer <[email protected]>
Co-authored-by: Scott Beddall <[email protected]>
Co-authored-by: Amos Hersch <[email protected]>
Co-authored-by: vcolin7 <[email protected]>
Co-authored-by: Scott Beddall (from Dev Box) <[email protected]>
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.Marketplace.LiveTests LiveTests to Recorded Tests

2 participants