shorten random package name, address pr feedback
This commit is contained in:
parent
59ae0e2d3d
commit
444dd6a031
3 changed files with 11 additions and 12 deletions
|
@ -152,7 +152,9 @@ namespace Microsoft.DotNet.Tests
|
||||||
var toolWithRandPkgNameDir = testInstance.Root.Sub("ToolWithRandomPackageName");
|
var toolWithRandPkgNameDir = testInstance.Root.Sub("ToolWithRandomPackageName");
|
||||||
var pkgsDir = testInstance.Root.CreateSubdirectory("pkgs");
|
var pkgsDir = testInstance.Root.CreateSubdirectory("pkgs");
|
||||||
|
|
||||||
string randomPackageName = Guid.NewGuid().ToString();
|
// 3ebdd4f1-a194-470a-b01a-4515672791d1
|
||||||
|
// ^-- index = 24
|
||||||
|
string randomPackageName = Guid.NewGuid().ToString().Substring(24);
|
||||||
|
|
||||||
// TODO: This is a workround for https://github.com/dotnet/cli/issues/5020
|
// TODO: This is a workround for https://github.com/dotnet/cli/issues/5020
|
||||||
SetGeneratedPackageName(appWithDepOnToolDir.GetFile("AppWithDepOnTool.csproj"),
|
SetGeneratedPackageName(appWithDepOnToolDir.GetFile("AppWithDepOnTool.csproj"),
|
||||||
|
@ -163,21 +165,18 @@ namespace Microsoft.DotNet.Tests
|
||||||
|
|
||||||
new RestoreCommand()
|
new RestoreCommand()
|
||||||
.WithWorkingDirectory(toolWithRandPkgNameDir)
|
.WithWorkingDirectory(toolWithRandPkgNameDir)
|
||||||
.ExecuteWithCapturedOutput()
|
.Execute()
|
||||||
.Should().Pass()
|
.Should().Pass();
|
||||||
.And.NotHaveStdErr();
|
|
||||||
|
|
||||||
new PackCommand()
|
new PackCommand()
|
||||||
.WithWorkingDirectory(toolWithRandPkgNameDir)
|
.WithWorkingDirectory(toolWithRandPkgNameDir)
|
||||||
.ExecuteWithCapturedOutput($"-o \"{pkgsDir.FullName}\"")
|
.Execute($"-o \"{pkgsDir.FullName}\"")
|
||||||
.Should().Pass()
|
.Should().Pass();
|
||||||
.And.NotHaveStdErr();
|
|
||||||
|
|
||||||
new RestoreCommand()
|
new RestoreCommand()
|
||||||
.WithWorkingDirectory(appWithDepOnToolDir)
|
.WithWorkingDirectory(appWithDepOnToolDir)
|
||||||
.ExecuteWithCapturedOutput($"--packages \"{pkgsDir.FullName}\"")
|
.Execute($"--packages \"{pkgsDir.FullName}\"")
|
||||||
.Should().Pass()
|
.Should().Pass();
|
||||||
.And.NotHaveStdErr();
|
|
||||||
|
|
||||||
new TestCommand("dotnet")
|
new TestCommand("dotnet")
|
||||||
.WithWorkingDirectory(appWithDepOnToolDir)
|
.WithWorkingDirectory(appWithDepOnToolDir)
|
||||||
|
|
Loading…
Add table
Reference in a new issue