Fix test with framework-dependent apphost.
This commit fixes the `ItPublishesFrameworkDependentWithRid` test to ensure the apphost is present in the published files. It also runs the application from the apphost to ensure it executes successfully. Fixes #9843.
This commit is contained in:
parent
d7b9504c9f
commit
f43226c2f1
2 changed files with 10 additions and 5 deletions
|
@ -23,7 +23,7 @@
|
|||
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
|
||||
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
|
||||
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
|
||||
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63130-08</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63215-01</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
|
||||
<MicrosoftNETSdkRazorPackageVersion>2.1.1</MicrosoftNETSdkRazorPackageVersion>
|
||||
<MicrosoftNETSdkWebPackageVersion>2.1.400-preview1-20180705-1834985</MicrosoftNETSdkWebPackageVersion>
|
||||
|
|
|
@ -123,6 +123,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
var outputDirectory = PublishApp(testAppName, rid, args);
|
||||
|
||||
outputDirectory.Should().OnlyHaveFiles(new[] {
|
||||
$"{testAppName}{Constants.ExeSuffix}",
|
||||
$"{testAppName}.dll",
|
||||
$"{testAppName}.pdb",
|
||||
$"{testAppName}.deps.json",
|
||||
|
@ -131,10 +132,14 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
|
||||
|
||||
new DotnetCommand()
|
||||
.ExecuteWithCapturedOutput(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll"))
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World");
|
||||
var command = new TestCommand(outputProgram);
|
||||
command.Environment[Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"] =
|
||||
new RepoDirectoriesProvider().DotnetRoot;
|
||||
command.ExecuteWithCapturedOutput()
|
||||
.Should()
|
||||
.Pass()
|
||||
.And
|
||||
.HaveStdOutContaining("Hello World");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
|
Loading…
Reference in a new issue