Skip to content

Commit

Permalink
Fix linux tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigusu-Allehu committed Oct 15, 2024
1 parent 1fc963a commit 85141d8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public async Task DiscoverAsync_withValidDotNetToolsPluginLinux_FindsThePlugin()
var myPlugin = Path.Combine(pluginPath, "nuget-plugin-MyPlugin");
File.WriteAllText(myPlugin, string.Empty);
Mock<IEnvironmentVariableReader> environmentalVariableReader = new Mock<IEnvironmentVariableReader>();
environmentalVariableReader.Setup(env => env.GetEnvironmentVariable(It.IsAny<string>())).Returns(pluginPath);
environmentalVariableReader.Setup(env => env.GetEnvironmentVariable(EnvironmentVariableConstants.PluginPaths)).Returns(pluginPath);

using (var process = new Process())
{
Expand Down Expand Up @@ -445,7 +445,7 @@ public async Task DiscoverAsync_WithPluginPathSpecifiedInNuGetPluginPathsEnvVari
var myPlugin = Path.Combine(pluginPath, "nuget-plugin-MyPlugin");
File.WriteAllText(myPlugin, string.Empty);
Mock<IEnvironmentVariableReader> environmentalVariableReader = new Mock<IEnvironmentVariableReader>();
environmentalVariableReader.Setup(env => env.GetEnvironmentVariable("NUGET_PLUGIN_PATHS")).Returns(pluginPath);
environmentalVariableReader.Setup(env => env.GetEnvironmentVariable(EnvironmentVariableConstants.PluginPaths)).Returns(pluginPath);
environmentalVariableReader.Setup(env => env.GetEnvironmentVariable("PATHS")).Returns("");

using (var process = new Process())
Expand Down Expand Up @@ -495,7 +495,7 @@ public async Task DiscoverAsync_withNoExecutableValidDotNetToolsPluginLinux_Does
var myPlugin = Path.Combine(pluginPath, "nuget-plugin-MyPlugin");
File.WriteAllText(myPlugin, string.Empty);
Mock<IEnvironmentVariableReader> environmentalVariableReader = new Mock<IEnvironmentVariableReader>();
environmentalVariableReader.Setup(env => env.GetEnvironmentVariable(It.IsAny<string>())).Returns(pluginPath);
environmentalVariableReader.Setup(env => env.GetEnvironmentVariable(EnvironmentVariableConstants.PluginPaths)).Returns(pluginPath);

using (var process = new Process())
{
Expand Down

0 comments on commit 85141d8

Please sign in to comment.