Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions eng/common/testproxy/test-proxy-docker.yml

This file was deleted.

12 changes: 11 additions & 1 deletion eng/common/testproxy/test-proxy-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ steps:
pwsh: true

- pwsh: |
$version = $(Get-Content "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt" -Raw).Trim()
$standardVersion = "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt"
$overrideVersion = "${{ parameters.templateRoot }}/eng/target_proxy_version.txt"

$version = $(Get-Content $standardVersion -Raw).Trim()

if (Test-Path $overrideVersion) {
$version = $(Get-Content $overrideVersion -Raw).Trim()
}

Write-Host "Installing test-proxy version $version"

dotnet tool install azure.sdk.tools.testproxy `
--tool-path $(Build.BinariesDirectory)/test-proxy `
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json `
Expand Down
1 change: 1 addition & 0 deletions eng/target_proxy_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0-dev.20240410.1
11 changes: 9 additions & 2 deletions tools/azure-sdk-tools/devtools_testutils/proxy_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,17 @@
def get_target_version(repo_root: str) -> str:
"""Gets the target test-proxy version from the target_version.txt file in /eng/common/testproxy"""
version_file_location = os.path.relpath("eng/common/testproxy/target_version.txt")
override_version_file_location = os.path.relpath("eng/target_proxy_version.txt")

version_file_location_from_root = os.path.abspath(os.path.join(repo_root, version_file_location))
override_version_file_location_from_root = os.path.abspath(os.path.join(repo_root, override_version_file_location))

with open(version_file_location_from_root, "r") as f:
target_version = f.read().strip()
if os.path.exists(override_version_file_location_from_root):
with open(override_version_file_location_from_root, "r") as f:
target_version = f.read().strip()
else:
with open(version_file_location_from_root, "r") as f:
target_version = f.read().strip()

return target_version

Expand Down