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
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,17 @@ public static void checkForTestProxyErrors(HttpResponse httpResponse) {
*/
public static String getTestProxyVersion(Path testClassPath) {
Path rootPath = TestUtils.getRepoRootResolveUntil(testClassPath, "eng");
Path overrideVersionFile = Paths.get("eng", "target_proxy_version.txt");
Path versionFile = Paths.get("eng", "common", "testproxy", "target_version.txt");
rootPath = rootPath.resolve(versionFile);

// if a long-lived override exists, use it.
if (Files.exists(rootPath.resolve(overrideVersionFile))) {
versionFile = overrideVersionFile;
}

Path versionFilePath = rootPath.resolve(versionFile);
try {
return Files.readAllLines(rootPath).get(0).replace(System.getProperty("line.separator"), "");
return Files.readAllLines(versionFilePath).get(0).replace(System.getProperty("line.separator"), "");
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down