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")
|
var testInstance = TestAssetsManager.CreateTestInstance("TestAppWithContentPackage")
|
||||||
.WithLockFiles();
|
.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[]
|
publishDir.Should().HaveFiles(new[]
|
||||||
{
|
{
|
||||||
"TestAppWithContentPackage.exe",
|
$"AppWithContentPackage{publishCommand.GetExecutableExtension()}",
|
||||||
"TestAppWithContentPackage.dll",
|
"AppWithContentPackage.dll",
|
||||||
"TestAppWithContentPackage.deps.json"
|
"AppWithContentPackage.deps.json"
|
||||||
});
|
});
|
||||||
|
|
||||||
// these files come from the contentFiles of the SharedContentA dependency
|
// these files come from the contentFiles of the SharedContentA dependency
|
||||||
|
@ -37,15 +42,5 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
|
||||||
.Should()
|
.Should()
|
||||||
.HaveFile("config.xml");
|
.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
Add a link
Reference in a new issue