Fix PublishTestAppWithContentPackage test to work on all platforms.
This commit is contained in:
parent
f6f1a52ec4
commit
deef7f867f
1 changed files with 9 additions and 14 deletions
|
@ -16,13 +16,18 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
|
|||
var testInstance = TestAssetsManager.CreateTestInstance("TestAppWithContentPackage")
|
||||
.WithLockFiles();
|
||||
|
||||
var publishDir = Publish(testInstance);
|
||||
var publishCommand = new PublishCommand(testInstance.TestRoot);
|
||||
var publishResult = publishCommand.Execute();
|
||||
|
||||
publishResult.Should().Pass();
|
||||
|
||||
var publishDir = publishCommand.GetOutputDirectory(portable: false);
|
||||
|
||||
publishDir.Should().HaveFiles(new[]
|
||||
{
|
||||
"TestAppWithContentPackage.exe",
|
||||
"TestAppWithContentPackage.dll",
|
||||
"TestAppWithContentPackage.deps.json"
|
||||
$"AppWithContentPackage{publishCommand.GetExecutableExtension()}",
|
||||
"AppWithContentPackage.dll",
|
||||
"AppWithContentPackage.deps.json"
|
||||
});
|
||||
|
||||
// these files come from the contentFiles of the SharedContentA dependency
|
||||
|
@ -37,15 +42,5 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
|
|||
.Should()
|
||||
.HaveFile("config.xml");
|
||||
}
|
||||
|
||||
private DirectoryInfo Publish(TestInstance testInstance)
|
||||
{
|
||||
var publishCommand = new PublishCommand(testInstance.TestRoot);
|
||||
var publishResult = publishCommand.Execute();
|
||||
|
||||
publishResult.Should().Pass();
|
||||
|
||||
return publishCommand.GetOutputDirectory(portable: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue