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>
|
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
|
||||||
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
|
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
|
||||||
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
|
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
|
||||||
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63130-08</MicrosoftNETSdkPackageVersion>
|
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63215-01</MicrosoftNETSdkPackageVersion>
|
||||||
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
|
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
|
||||||
<MicrosoftNETSdkRazorPackageVersion>2.1.1</MicrosoftNETSdkRazorPackageVersion>
|
<MicrosoftNETSdkRazorPackageVersion>2.1.1</MicrosoftNETSdkRazorPackageVersion>
|
||||||
<MicrosoftNETSdkWebPackageVersion>2.1.400-preview1-20180705-1834985</MicrosoftNETSdkWebPackageVersion>
|
<MicrosoftNETSdkWebPackageVersion>2.1.400-preview1-20180705-1834985</MicrosoftNETSdkWebPackageVersion>
|
||||||
|
|
|
@ -123,6 +123,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
||||||
var outputDirectory = PublishApp(testAppName, rid, args);
|
var outputDirectory = PublishApp(testAppName, rid, args);
|
||||||
|
|
||||||
outputDirectory.Should().OnlyHaveFiles(new[] {
|
outputDirectory.Should().OnlyHaveFiles(new[] {
|
||||||
|
$"{testAppName}{Constants.ExeSuffix}",
|
||||||
$"{testAppName}.dll",
|
$"{testAppName}.dll",
|
||||||
$"{testAppName}.pdb",
|
$"{testAppName}.pdb",
|
||||||
$"{testAppName}.deps.json",
|
$"{testAppName}.deps.json",
|
||||||
|
@ -131,10 +132,14 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
||||||
|
|
||||||
var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
|
var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
|
||||||
|
|
||||||
new DotnetCommand()
|
var command = new TestCommand(outputProgram);
|
||||||
.ExecuteWithCapturedOutput(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll"))
|
command.Environment[Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"] =
|
||||||
.Should().Pass()
|
new RepoDirectoriesProvider().DotnetRoot;
|
||||||
.And.HaveStdOutContaining("Hello World");
|
command.ExecuteWithCapturedOutput()
|
||||||
|
.Should()
|
||||||
|
.Pass()
|
||||||
|
.And
|
||||||
|
.HaveStdOutContaining("Hello World");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
|
|
Loading…
Reference in a new issue