From 70ef2ec197600acdb6e45fd2766ab9466f52cdfe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 17:10:26 +0000 Subject: [PATCH 1/5] Initial plan From ab88241e9c512b5a43a71a926ab73d25319e732e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 17:14:12 +0000 Subject: [PATCH 2/5] Add documentation and remove invisible characters from Fix-TestRecording.ps1 Co-authored-by: hallipr <1291634+hallipr@users.noreply.github.com> --- .../tests/Fix-TestRecording.ps1 | 50 ++++++++++++++++--- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 index e7d4ed064f..cfbc4f7db9 100644 --- a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 +++ b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 @@ -1,3 +1,41 @@ +#!/usr/bin/env pwsh + +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +#Requires -Version 6.0 +#Requires -PSEdition Core + +<# +.SYNOPSIS + Removes consecutive 'InProgress' responses from Azure Managed Lustre test recordings. + +.DESCRIPTION + This script processes test recordings for Azure Managed Lustre to optimize recording size + by removing consecutive 'InProgress' status responses. It locates the recording file using + test-proxy, processes it to remove duplicate InProgress entries, and pushes the updated + recording back to the assets repository. + +.PARAMETER TestName + The name of the test for which to fix the recording. + Default: 'Should_create_azure_managed_lustre_with_storage_and_cmk' + +.EXAMPLE + .\Fix-TestRecording.ps1 + Processes the default test recording and removes consecutive InProgress responses. + +.NOTES + This script requires the test-proxy tool to be installed and accessible in the PATH. + The script will: + 1. Locate the assets path using test-proxy + 2. Find the recording file for the specified test + 3. Remove consecutive 'InProgress' status entries + 4. Push the updated recording back to the assets repository +#> + +[CmdletBinding()] +param() + $ErrorActionPreference = "Stop" $testName = 'Should_create_azure_managed_lustre_with_storage_and_cmk' @@ -30,12 +68,12 @@ $lastStatus = '' Write-Host "Original number of entries: $($recording.Entries.Count)" -ForegroundColor Yellow # Remove consecutive 'InProgress' responses -foreach ($entry in $recording.Entries) { - $currentStatus = $entry.ResponseBody.status - if ($currentStatus -ne 'InProgress' -or $lastStatus -ne 'InProgress') { - $newEntries += $entry - } - $lastStatus = $currentStatus +foreach ($entry in $recording.Entries) { + $currentStatus = $entry.ResponseBody.status + if ($currentStatus -ne 'InProgress' -or $lastStatus -ne 'InProgress') { + $newEntries += $entry + } + $lastStatus = $currentStatus } $recording.Entries = $newEntries From 76a91662dd7d8feff7c8a8f2a4fa957757e6200e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 17:15:20 +0000 Subject: [PATCH 3/5] Fix documentation to remove non-existent TestName parameter Co-authored-by: hallipr <1291634+hallipr@users.noreply.github.com> --- .../tests/Fix-TestRecording.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 index cfbc4f7db9..403faa5044 100644 --- a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 +++ b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 @@ -16,13 +16,11 @@ test-proxy, processes it to remove duplicate InProgress entries, and pushes the updated recording back to the assets repository. -.PARAMETER TestName - The name of the test for which to fix the recording. - Default: 'Should_create_azure_managed_lustre_with_storage_and_cmk' + The script processes the test 'Should_create_azure_managed_lustre_with_storage_and_cmk'. .EXAMPLE .\Fix-TestRecording.ps1 - Processes the default test recording and removes consecutive InProgress responses. + Processes the test recording and removes consecutive InProgress responses. .NOTES This script requires the test-proxy tool to be installed and accessible in the PATH. From 3d45f6aa6835fab377e243a5e475b45b3659e089 Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Tue, 13 Jan 2026 09:52:08 -0800 Subject: [PATCH 4/5] Apply suggestion from @hallipr --- tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 index 403faa5044..f64a85e1c5 100644 --- a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 +++ b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 @@ -3,7 +3,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -#Requires -Version 6.0 +#Requires -Version 7.0 #Requires -PSEdition Core <# From 3cda04a41126aae663c10373285f08921edd2435 Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Tue, 13 Jan 2026 09:53:07 -0800 Subject: [PATCH 5/5] Update Fix-TestRecording.ps1 to remove PSEdition requirement Removed requirement for PSEdition Core in the script. --- tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 index f64a85e1c5..3025e715c0 100644 --- a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 +++ b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Fix-TestRecording.ps1 @@ -4,7 +4,6 @@ # Licensed under the MIT License. #Requires -Version 7.0 -#Requires -PSEdition Core <# .SYNOPSIS