Update samples and tests to target netcoreapp2.1
This commit is contained in:
parent
527a6dc97a
commit
cf64cf2c4a
|
|
@ -5,19 +5,19 @@
|
|||
<PropertyGroup Label="Package Versions">
|
||||
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15550</InternalAspNetCoreSdkPackageVersion>
|
||||
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion>1.0.0-pre-10141</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
|
||||
<MicrosoftAspNetCoreResponseCompressionPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreResponseCompressionPackageVersion>
|
||||
<MicrosoftAspNetCoreServerHttpSysPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreServerHttpSysPackageVersion>
|
||||
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
|
||||
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.5.0-preview1-27498</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
|
||||
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreServerKestrelPackageVersion>
|
||||
<MicrosoftAspNetCoreWebUtilitiesPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreWebUtilitiesPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||
<MicrosoftExtensionsConfigurationJsonPackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
||||
<MicrosoftExtensionsLoggingConsolePackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsLoggingConsolePackageVersion>
|
||||
<MicrosoftExtensionsLoggingPackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsLoggingPackageVersion>
|
||||
<MicrosoftExtensionsLoggingTestingPackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsLoggingTestingPackageVersion>
|
||||
<MicrosoftAspNetCoreResponseCompressionPackageVersion>2.1.0-preview1-27595</MicrosoftAspNetCoreResponseCompressionPackageVersion>
|
||||
<MicrosoftAspNetCoreServerHttpSysPackageVersion>2.1.0-preview1-27595</MicrosoftAspNetCoreServerHttpSysPackageVersion>
|
||||
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.1.0-preview1-27595</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
|
||||
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.5.0-preview1-27595</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
|
||||
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.1.0-preview1-27595</MicrosoftAspNetCoreServerKestrelPackageVersion>
|
||||
<MicrosoftAspNetCoreWebUtilitiesPackageVersion>2.1.0-preview1-27595</MicrosoftAspNetCoreWebUtilitiesPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.1.0-preview1-27595</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||
<MicrosoftExtensionsConfigurationJsonPackageVersion>2.1.0-preview1-27595</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
||||
<MicrosoftExtensionsLoggingConsolePackageVersion>2.1.0-preview1-27595</MicrosoftExtensionsLoggingConsolePackageVersion>
|
||||
<MicrosoftExtensionsLoggingPackageVersion>2.1.0-preview1-27595</MicrosoftExtensionsLoggingPackageVersion>
|
||||
<MicrosoftExtensionsLoggingTestingPackageVersion>2.1.0-preview1-27595</MicrosoftExtensionsLoggingTestingPackageVersion>
|
||||
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
|
||||
<MicrosoftNetHttpHeadersPackageVersion>2.1.0-preview1-27498</MicrosoftNetHttpHeadersPackageVersion>
|
||||
<MicrosoftNetHttpHeadersPackageVersion>2.1.0-preview1-27595</MicrosoftNetHttpHeadersPackageVersion>
|
||||
<MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
|
||||
<SerilogExtensionsLoggingPackageVersion>1.4.0</SerilogExtensionsLoggingPackageVersion>
|
||||
<SerilogSinksFilePackageVersion>3.2.0</SerilogSinksFilePackageVersion>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@
|
|||
<Import Project="..\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<DeveloperBuildTestTfms>netcoreapp2.1</DeveloperBuildTestTfms>
|
||||
<DeveloperBuildTestTfms>netcoreapp2.1;netcoreapp2.0</DeveloperBuildTestTfms>
|
||||
<StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
|
||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">netcoreapp2.1;netcoreapp2.0</StandardTestTfms>
|
||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -19,15 +19,22 @@ namespace ServerComparison.FunctionalTests
|
|||
{
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task HelloWorld_Windows_CLR(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
return HelloWorld(serverType, runtimeFlavor, architecture, applicationType);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
return HelloWorld(serverType, runtimeFlavor, architecture, applicationType);
|
||||
|
|
@ -63,7 +70,7 @@ namespace ServerComparison.FunctionalTests
|
|||
EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld',
|
||||
ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"),
|
||||
SiteName = "HttpTestSite", // This is configured in the Http.config
|
||||
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||
TargetFramework = Helpers.GetTargetFramework(runtimeFlavor),
|
||||
ApplicationType = applicationType
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -45,5 +45,30 @@ namespace ServerComparison.FunctionalTests
|
|||
|
||||
return content;
|
||||
}
|
||||
|
||||
public static string GetTargetFramework(RuntimeFlavor runtimeFlavor)
|
||||
{
|
||||
if (runtimeFlavor == RuntimeFlavor.Clr)
|
||||
{
|
||||
#if NET461
|
||||
return "net461";
|
||||
#elif NETCOREAPP2_0 || NETCOREAPP2_1
|
||||
#else
|
||||
#error Tests targeting CLR must be compiled only on desktop.
|
||||
#endif
|
||||
}
|
||||
else if (runtimeFlavor == RuntimeFlavor.CoreClr)
|
||||
{
|
||||
#if NETCOREAPP2_0
|
||||
return "netcoreapp2.0";
|
||||
#elif NETCOREAPP2_1 || NET461
|
||||
return "netcoreapp2.1";
|
||||
#else
|
||||
#error Target frameworks need to be updated.
|
||||
#endif
|
||||
}
|
||||
|
||||
throw new ArgumentException($"Unknown RuntimeFlavor '{runtimeFlavor}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -25,12 +25,14 @@ namespace ServerComparison.FunctionalTests
|
|||
[Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Standalone)]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone)]
|
||||
public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, string targetFramework, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}";
|
||||
using (StartLog(out var loggerFactory, testName))
|
||||
|
|
@ -42,7 +44,7 @@ namespace ServerComparison.FunctionalTests
|
|||
EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication'
|
||||
ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "NtlmAuthentication.config", nginxConfig: null),
|
||||
SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config
|
||||
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||
TargetFramework = targetFramework,
|
||||
ApplicationType = applicationType
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ namespace ServerComparison.FunctionalTests
|
|||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
|
|
@ -57,14 +56,20 @@ namespace ServerComparison.FunctionalTests
|
|||
return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
public Task ResponseCompression_Windows_HostCompression()
|
||||
{
|
||||
return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true);
|
||||
return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true);
|
||||
}
|
||||
|
||||
[ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public Task ResponseCompression_Windows_HostCompression_CLR()
|
||||
{
|
||||
return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
@ -76,14 +81,19 @@ namespace ServerComparison.FunctionalTests
|
|||
return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[ConditionalFact]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
public Task ResponseCompression_Windows_AppCompression_CLR()
|
||||
{
|
||||
return ResponseCompression(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: false);
|
||||
}
|
||||
|
||||
[ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
public Task ResponseCompression_Windows_AppCompression()
|
||||
{
|
||||
return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false);
|
||||
return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Standalone, hostCompression: false);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
|
@ -103,14 +113,19 @@ namespace ServerComparison.FunctionalTests
|
|||
return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone , Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
public Task ResponseCompression_Windows_AppAndHostCompression()
|
||||
{
|
||||
return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true);
|
||||
return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Standalone, hostCompression: true);
|
||||
}
|
||||
|
||||
[ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
public Task ResponseCompression_Windows_AppAndHostCompression_CLR()
|
||||
{
|
||||
return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: true);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
@ -136,7 +151,7 @@ namespace ServerComparison.FunctionalTests
|
|||
hostCompression ? "http.config" : "NoCompression.config",
|
||||
hostCompression ? "nginx.conf" : "NoCompression.conf"),
|
||||
SiteName = "HttpTestSite", // This is configured in the Http.config
|
||||
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||
TargetFramework = Helpers.GetTargetFramework(runtimeFlavor),
|
||||
ApplicationType = applicationType
|
||||
};
|
||||
|
||||
|
|
@ -227,8 +242,7 @@ namespace ServerComparison.FunctionalTests
|
|||
private static string GetContentLength(HttpResponseMessage response)
|
||||
{
|
||||
// Don't use response.Content.Headers.ContentLength, it will dynamically calculate the value if it can.
|
||||
IEnumerable<string> values;
|
||||
return response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out values) ? values.FirstOrDefault() : null;
|
||||
return response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out var values) ? values.FirstOrDefault() : null;
|
||||
}
|
||||
|
||||
private static async Task<string> ReadCompressedAsStringAsync(HttpContent content)
|
||||
|
|
|
|||
|
|
@ -24,15 +24,14 @@ namespace ServerComparison.FunctionalTests
|
|||
{
|
||||
}
|
||||
|
||||
#if NET461
|
||||
[Theory]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Theory]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
|
|
@ -51,8 +50,8 @@ namespace ServerComparison.FunctionalTests
|
|||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType);
|
||||
}
|
||||
|
||||
#if NET461
|
||||
[Theory]
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
// IIS will remove the "Connection: close" header https://github.com/aspnet/IISIntegration/issues/7
|
||||
public Task ResponseFormats_Windows_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
|
|
@ -61,14 +60,14 @@ namespace ServerComparison.FunctionalTests
|
|||
}
|
||||
|
||||
|
||||
[Theory]
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/WebListener/issues/259
|
||||
// IIS will remove the "Connection: close" header https://github.com/aspnet/IISIntegration/issues/7
|
||||
public Task ResponseFormats_Windows_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Theory]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
|
|
@ -86,15 +85,14 @@ namespace ServerComparison.FunctionalTests
|
|||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType);
|
||||
}
|
||||
|
||||
#if NET461
|
||||
[Theory]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Theory]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
|
|
@ -113,15 +111,14 @@ namespace ServerComparison.FunctionalTests
|
|||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType);
|
||||
}
|
||||
|
||||
#if NET461
|
||||
[Theory]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")]
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Theory]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
|
|
@ -140,15 +137,14 @@ namespace ServerComparison.FunctionalTests
|
|||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType);
|
||||
}
|
||||
|
||||
#if NET461
|
||||
[Theory]
|
||||
[ConditionalTheory]
|
||||
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
|
||||
// [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/IISIntegration/issues/7
|
||||
[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
|
||||
{
|
||||
return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Theory]
|
||||
[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
|
||||
|
|
@ -160,17 +156,6 @@ namespace ServerComparison.FunctionalTests
|
|||
|
||||
private async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func<HttpClient, ILogger, Task> scenario, ApplicationType applicationType, [CallerMemberName] string testName = null)
|
||||
{
|
||||
var targetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" :
|
||||
#if NETCOREAPP2_0
|
||||
"netcoreapp2.0";
|
||||
#elif NETCOREAPP2_1
|
||||
"netcoreapp2.1";
|
||||
#elif NET461
|
||||
#error Tests targeting CLR must be compiled only on desktop.
|
||||
#else
|
||||
#error Target frameworks need to be updated.
|
||||
#endif
|
||||
|
||||
testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}";
|
||||
using (StartLog(out var loggerFactory, testName))
|
||||
{
|
||||
|
|
@ -181,7 +166,7 @@ namespace ServerComparison.FunctionalTests
|
|||
EnvironmentName = "Responses",
|
||||
ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"),
|
||||
SiteName = "HttpTestSite", // This is configured in the Http.config
|
||||
TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
|
||||
TargetFramework = Helpers.GetTargetFramework(runtimeFlavor),
|
||||
ApplicationType = applicationType
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue