Migrate Keyvault tool to recorded tests#1080
Merged
Merged
Conversation
…getting closer to actually trying some of this on a per-test level
…the inheriting classes. maybe that's not a bad thing?
…e. we're going to make this happen!
…ctual integration testing
…. It actually stores a recording and properly locates the assets.json now! time to regenerate the client, ad the delegating handler, and get it ready for PR!
… now hitting random build failures because of nuget SOMEHOW
…grate without sanitizers etc.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the KeyVault tool from live tests to recorded tests, enabling test recording and playback functionality. This migration includes infrastructure changes to support per-test matcher settings and comprehensive sanitization of sensitive test data.
Key Changes:
- Migrated test base class from
CommandTestsBasetoRecordedCommandTestsBasewith sanitizer configurations - Integrated
IHttpClientServiceintoKeyVaultServiceto enable HTTP traffic recording/playback - Added pre-generated test certificate assets and loading infrastructure
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| KeyVaultCommandTests.cs | Migrated to RecordedCommandTestsBase with sanitizers, test variable registration, and certificate asset handling |
| KeyVaultService.cs | Added IHttpClientService dependency and created helper methods to inject HttpClient into Azure SDK clients |
| Azure.Mcp.Tools.KeyVault.LiveTests.csproj | Added configuration to copy test certificate file to output directory |
| assets.json | Added test proxy assets configuration for recording management |
| fake-pfx.pfx | Added pre-generated test certificate binary for import tests |
scbedd
commented
Nov 13, 2025
Contributor
Author
|
After running recorded tests, we're seeing a new failure on |
…e keystore on mac only.
1 task
vcolin7
approved these changes
Nov 20, 2025
…LiveTests/KeyVaultCommandTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
vcolin7
approved these changes
Nov 20, 2025
colbytimm
pushed a commit
to colbytimm/microsoft-mcp
that referenced
this pull request
Dec 8, 2025
* inject IHttpClientService into KeyVaultService * Update KeyvaultCommandTests for recordings * Add assets.json for recordings run Co-authored-by: Patrick Hallisey <pahallis@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This PR migrates
keyvaultlivetests to recorded tests, adds and assets.json.Day-to-day development is not yet affected. I need to add a couple more PRs to add stages that will run recorded tests in
CIbefore it will mean anything to devs.