Skip to content

Commit

Permalink
Pass Assets Directory in CI (#37868)
Browse files Browse the repository at this point in the history
* When running in CI, pass a different temp dir for each proxy invocation to clone assets within
  • Loading branch information
scbedd authored Jul 27, 2023
1 parent c50dec9 commit 3f346fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sdk/core/Azure.Core.TestFramework/src/TestProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ 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);
Expand Down

0 comments on commit 3f346fd

Please sign in to comment.