diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 9bde37e0b7a2e..9f8df1bcaaa5f 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -301,7 +301,7 @@ - 1.0.0-dev.20230706.1 + 1.0.0-dev.20230728.1 diff --git a/eng/common/testproxy/transition-scripts/README.md b/eng/common/testproxy/onboarding/README.me similarity index 100% rename from eng/common/testproxy/transition-scripts/README.md rename to eng/common/testproxy/onboarding/README.me diff --git a/eng/common/testproxy/transition-scripts/generate-assets-json.ps1 b/eng/common/testproxy/onboarding/generate-assets-json.ps1 similarity index 97% rename from eng/common/testproxy/transition-scripts/generate-assets-json.ps1 rename to eng/common/testproxy/onboarding/generate-assets-json.ps1 index 7ecd8408af016..3011a19e57aa0 100644 --- a/eng/common/testproxy/transition-scripts/generate-assets-json.ps1 +++ b/eng/common/testproxy/onboarding/generate-assets-json.ps1 @@ -308,18 +308,17 @@ Function Invoke-ProxyCommand { # Get the shorthash directory under PROXY_ASSETS_FOLDER Function Get-AssetsRoot { param( - [string] $AssetsJsonFile + [string] $AssetsJsonFile, + [string] $TestProxyExe ) $repoRoot = Get-Repo-Root $relPath = [IO.Path]::GetRelativePath($repoRoot, $AssetsJsonFile).Replace("`\", "/") $assetsJsonDirectory = Split-Path $relPath - $breadcrumbFile = Join-Path $repoRoot ".assets" ".breadcrumb" - $breadcrumbString = Get-Content $breadcrumbFile | Where-Object { $_.StartsWith($relPath) } - $assetRepo = $breadcrumbString.Split(";")[1] - $assetsPrefix = (Get-Content $AssetsJsonFile | Out-String | ConvertFrom-Json).AssetsRepoPrefixPath + [array] $output = & "$TestProxyExe" config locate -a "$relPath" --storage-location="$repoRoot" + $assetsDirectory = $output[-1] - return Join-Path $repoRoot ".assets" $assetRepo $assetsPrefix $assetsJsonDirectory + return Join-Path $assetsDirectory $assetsJsonDirectory } Function Move-AssetsFromLangRepo { @@ -405,7 +404,7 @@ if ($InitialPush) { $CommandArgs = "restore --assets-json-path $assetsJsonRelPath" Invoke-ProxyCommand -TestProxyExe $TestProxyExe -CommandArgs $CommandArgs -TargetDirectory $repoRoot - $assetsRoot = (Get-AssetsRoot -AssetsJsonFile $assetsJsonFile) + $assetsRoot = (Get-AssetsRoot -AssetsJsonFile $assetsJsonFile -TestProxyExe $TestProxyExe) Write-Host "assetsRoot=$assetsRoot" Move-AssetsFromLangRepo -AssetsRoot $assetsRoot diff --git a/eng/common/testproxy/target_version.txt b/eng/common/testproxy/target_version.txt index 6b3a646afd839..faaab72a41d3d 100644 --- a/eng/common/testproxy/target_version.txt +++ b/eng/common/testproxy/target_version.txt @@ -1 +1 @@ -1.0.0-dev.20230706.1 +1.0.0-dev.20230728.1 diff --git a/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs b/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs index 72d77b9cc1899..4521342d35613 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestProxy.cs @@ -81,13 +81,6 @@ private TestProxy(string proxyPath, bool debugMode = false) } }; - bool.TryParse(Environment.GetEnvironmentVariable("TF_BUILD"), out bool inCI); - - if (inCI) - { - testProxyProcessInfo.EnvironmentVariables["PROXY_ASSETS_FOLDER"] = Path.Combine(System.IO.Path.GetTempPath(), Guid.NewGuid().ToString()); - } - _testProxyProcess = Process.Start(testProxyProcessInfo); ProcessTracker.Add(_testProxyProcess);