Guarantee that ANCM package dlls are used for back compat tests (#10858)
This commit is contained in:
parent
f080c89e89
commit
d3e90a7c07
|
|
@ -328,7 +328,7 @@ jobs:
|
||||||
agentOs: Windows
|
agentOs: Windows
|
||||||
isTestingJob: true
|
isTestingJob: true
|
||||||
buildScript: ./eng/scripts/cibuild.cmd
|
buildScript: ./eng/scripts/cibuild.cmd
|
||||||
buildArgs: -test -BuildNative "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true /p:RunTemplateTests=false /p:BuildSiteExtensions=false"
|
buildArgs: -test -BuildNative "/p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false /p:BuildSiteExtensions=false"
|
||||||
beforeBuild:
|
beforeBuild:
|
||||||
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
|
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
|
||||||
displayName: Setup IISExpress test certificates and schema
|
displayName: Setup IISExpress test certificates and schema
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
|
|
||||||
public static string GetInProcessTestSitesName()
|
public static string GetInProcessTestSitesName()
|
||||||
{
|
{
|
||||||
return DeployerSelector.IsForwardsCompatibilityTest ? "InProcessForwardsCompatWebSite" : "InProcessWebSite";
|
return DeployerSelector.IsNewShimTest ? "InProcessNewShimWebSite" : "InProcessWebSite";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task AssertStarts(this IISDeploymentResult deploymentResult, string path = "/HelloWorld")
|
public static async Task AssertStarts(this IISDeploymentResult deploymentResult, string path = "/HelloWorld")
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
public static class DeployerSelector
|
public static class DeployerSelector
|
||||||
{
|
{
|
||||||
public static ServerType ServerType => ServerType.IIS;
|
public static ServerType ServerType => ServerType.IIS;
|
||||||
public static bool IsForwardsCompatibilityTest => false;
|
public static bool IsNewShimTest => false;
|
||||||
public static bool HasNewShim => true;
|
public static bool HasNewShim => true;
|
||||||
public static bool HasNewHandler => true;
|
public static bool HasNewHandler => true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
||||||
<ProjectReference Include="$(RepoRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />
|
|
||||||
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
|
|
||||||
|
|
||||||
<ProjectReference Include="..\testassets\InProcessWebSite\InProcessWebSite.csproj">
|
<ProjectReference Include="..\testassets\InProcessWebSite\InProcessWebSite.csproj">
|
||||||
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
public static class DeployerSelector
|
public static class DeployerSelector
|
||||||
{
|
{
|
||||||
public static ServerType ServerType => ServerType.IIS;
|
public static ServerType ServerType => ServerType.IIS;
|
||||||
public static bool IsForwardsCompatibilityTest => false;
|
public static bool IsNewShimTest => false;
|
||||||
public static bool HasNewShim => false;
|
public static bool HasNewShim => false;
|
||||||
public static bool HasNewHandler => true;
|
public static bool HasNewHandler => true;
|
||||||
}
|
}
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<TestGroupName>IISBackwardsCompatibility.FunctionalTests</TestGroupName>
|
<TestGroupName>IISNewHandler.FunctionalTests</TestGroupName>
|
||||||
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
||||||
<SkipTests Condition=" '$(SkipIISBackwardsCompatibilityTests)' == 'true' ">true</SkipTests>
|
<SkipTests Condition=" '$(SkipIISNewHandlerTests)' == 'true' ">true</SkipTests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="../FunctionalTest.props" />
|
<Import Project="../FunctionalTest.props" />
|
||||||
|
|
@ -16,9 +16,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
||||||
<ProjectReference Include="..\testassets\**\*.csproj">
|
|
||||||
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\testassets\InProcessWebSite\InProcessWebSite.csproj">
|
<ProjectReference Include="..\testassets\InProcessWebSite\InProcessWebSite.csproj">
|
||||||
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
|
@ -39,11 +36,4 @@
|
||||||
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
|
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="RemoveSourceOverride" BeforeTargets="_CopyOutOfDateSourceItemsToOutputDirectory">
|
|
||||||
<ItemGroup>
|
|
||||||
<SourceItemsToRemove Include="@(_SourceItemsToCopyToOutputDirectory)" Condition="$([System.String]::Copy(%(_SourceItemsToCopyToOutputDirectory.FullPath)).Contains('IIS\AspNetCoreModule')) == 'true'" />
|
|
||||||
<_SourceItemsToCopyToOutputDirectory Remove="@(SourceItemsToRemove)" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -10,17 +10,17 @@ using Xunit.Sdk;
|
||||||
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
{
|
{
|
||||||
[Collection(IISTestSiteCollection.Name)]
|
[Collection(IISTestSiteCollection.Name)]
|
||||||
public class BackwardsCompatibilityTests : FixtureLoggedTest
|
public class NewHandlerTests : FixtureLoggedTest
|
||||||
{
|
{
|
||||||
private readonly IISTestSiteFixture _fixture;
|
private readonly IISTestSiteFixture _fixture;
|
||||||
|
|
||||||
public BackwardsCompatibilityTests(IISTestSiteFixture fixture) : base(fixture)
|
public NewHandlerTests(IISTestSiteFixture fixture) : base(fixture)
|
||||||
{
|
{
|
||||||
_fixture = fixture;
|
_fixture = fixture;
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
public async Task CheckBackwardsCompatibilityIsUsed()
|
public async Task CheckNewHandlerIsUsed()
|
||||||
{
|
{
|
||||||
var response = await _fixture.Client.GetAsync("/HelloWorld");
|
var response = await _fixture.Client.GetAsync("/HelloWorld");
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
|
|
||||||
foreach (ProcessModule handle in handles)
|
foreach (ProcessModule handle in handles)
|
||||||
{
|
{
|
||||||
if (handle.ModuleName == "aspnetcorev2.dll")
|
if (handle.ModuleName == "aspnetcorev2.dll" || handle.ModuleName == "aspnetcorev2_outofprocess.dll")
|
||||||
{
|
{
|
||||||
Assert.Equal("12.2.18316.0", handle.FileVersionInfo.FileVersion);
|
Assert.Equal("12.2.18316.0", handle.FileVersionInfo.FileVersion);
|
||||||
return;
|
return;
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
public static class DeployerSelector
|
public static class DeployerSelector
|
||||||
{
|
{
|
||||||
public static ServerType ServerType => ServerType.IIS;
|
public static ServerType ServerType => ServerType.IIS;
|
||||||
public static bool IsForwardsCompatibilityTest => true;
|
public static bool IsNewShimTest => true;
|
||||||
public static bool HasNewShim => true;
|
public static bool HasNewShim => true;
|
||||||
public static bool HasNewHandler => false;
|
public static bool HasNewHandler => false;
|
||||||
}
|
}
|
||||||
|
|
@ -10,17 +10,17 @@ using Xunit.Sdk;
|
||||||
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
{
|
{
|
||||||
[Collection(IISTestSiteCollection.Name)]
|
[Collection(IISTestSiteCollection.Name)]
|
||||||
public class ForwardsCompatibilityTests : FixtureLoggedTest
|
public class NewShimTests : FixtureLoggedTest
|
||||||
{
|
{
|
||||||
private readonly IISTestSiteFixture _fixture;
|
private readonly IISTestSiteFixture _fixture;
|
||||||
|
|
||||||
public ForwardsCompatibilityTests(IISTestSiteFixture fixture) : base(fixture)
|
public NewShimTests(IISTestSiteFixture fixture) : base(fixture)
|
||||||
{
|
{
|
||||||
_fixture = fixture;
|
_fixture = fixture;
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
public async Task CheckForwardsCompatibilityIsUsed()
|
public async Task CheckNewShimIsUsed()
|
||||||
{
|
{
|
||||||
var response = await _fixture.Client.GetAsync("/HelloWorld");
|
var response = await _fixture.Client.GetAsync("/HelloWorld");
|
||||||
var handles = _fixture.DeploymentResult.HostProcess.Modules;
|
var handles = _fixture.DeploymentResult.HostProcess.Modules;
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<TestGroupName>IISForwardsCompatibility.FunctionalTests</TestGroupName>
|
<TestGroupName>IISNewShim.FunctionalTests</TestGroupName>
|
||||||
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
||||||
<SkipTests Condition=" '$(SkipIISForwardsCompatibilityTests)' == 'true' ">true</SkipTests>
|
<SkipTests Condition=" '$(SkipIISNewShimTests)' == 'true' ">true</SkipTests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="../FunctionalTest.props" />
|
<Import Project="../FunctionalTest.props" />
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
||||||
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
|
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
|
||||||
|
|
||||||
<ProjectReference Include="..\testassets\InProcessForwardsCompatWebSite\InProcessForwardsCompatWebSite.csproj">
|
<ProjectReference Include="..\testassets\InProcessNewShimWebSite\InProcessNewShimWebSite.csproj">
|
||||||
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
public static class DeployerSelector
|
public static class DeployerSelector
|
||||||
{
|
{
|
||||||
public static ServerType ServerType => ServerType.IISExpress;
|
public static ServerType ServerType => ServerType.IISExpress;
|
||||||
public static bool IsForwardsCompatibilityTest => false;
|
public static bool IsNewShimTest => false;
|
||||||
public static bool HasNewShim => true;
|
public static bool HasNewShim => true;
|
||||||
public static bool HasNewHandler => true;
|
public static bool HasNewHandler => true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<AssemblyName>InProcessWebSite</AssemblyName>
|
<AssemblyName>InProcessWebSite</AssemblyName>
|
||||||
<TestAssetOutputName>InProcessForwardsCompatWebSite</TestAssetOutputName>
|
<TestAssetOutputName>InProcessNewShimWebSite</TestAssetOutputName>
|
||||||
<DefineConstants>FORWARDCOMPAT</DefineConstants>
|
<DefineConstants>FORWARDCOMPAT</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
@ -63,9 +63,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.Tests", "IIS\test\IIS.T
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Tests", "IIS\test\Common.Tests\Common.Tests.csproj", "{D17B7B35-5361-4A50-B499-E03E5C3CC095}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Tests", "IIS\test\Common.Tests\Common.Tests.csproj", "{D17B7B35-5361-4A50-B499-E03E5C3CC095}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.BackwardsCompatibility.FunctionalTests", "IIS\test\IIS.BackwardsCompatibility.FunctionalTests\IIS.BackwardsCompatibility.FunctionalTests.csproj", "{582B07BC-73F4-4689-8557-B039298BD82C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.NewHandler.FunctionalTests", "IIS\test\IIS.NewHandler.FunctionalTests\IIS.NewHandler.FunctionalTests.csproj", "{582B07BC-73F4-4689-8557-B039298BD82C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.ForwardsCompatibility.FunctionalTests", "IIS\test\IIS.ForwardsCompatibility.FunctionalTests\IIS.ForwardsCompatibility.FunctionalTests.csproj", "{D1EA5D99-28FD-4197-81DE-17098846B38B}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.NewShim.FunctionalTests", "IIS\test\IIS.NewShim.FunctionalTests\IIS.NewShim.FunctionalTests.csproj", "{D1EA5D99-28FD-4197-81DE-17098846B38B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestTasks", "IIS\test\testassets\TestTasks\TestTasks.csproj", "{2DD1269D-131C-4531-BB0D-7BE0EF8E56D0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestTasks", "IIS\test\testassets\TestTasks\TestTasks.csproj", "{2DD1269D-131C-4531-BB0D-7BE0EF8E56D0}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
Condition="!Exists('$(AspNetCoreModuleV2ShimDll)') OR !Exists('$(AspNetCoreModuleV2OutOfProcessHandlerDll)')" />
|
Condition="!Exists('$(AspNetCoreModuleV2ShimDll)') OR !Exists('$(AspNetCoreModuleV2OutOfProcessHandlerDll)')" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(VCTargetsPath)' != ''">
|
<ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(VCTargetsPath)' != '' AND '$(TestGroupName)' != 'IISNewHandler.FunctionalTests'">
|
||||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x64"/>
|
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x64"/>
|
||||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="x64" />
|
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="x64" />
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue