ServerTests 259 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. commit 53564567662a09adb3c8d4c5ecbd5b4cfada1351
  2. Author: Chris Ross (ASP.NET) <[email protected]>
  3. Date: Thu Apr 5 10:13:48 2018 -0700
  4. Simplify test TFMs #82
  5. diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs
  6. index 74ddfddcc8c..1e146b49971 100644
  7. --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs
  8. +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs
  9. @@ -19,18 +19,10 @@ namespace ServerComparison.FunctionalTests
  10. {
  11. }
  12. - [ConditionalTheory]
  13. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  14. - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")]
  15. - [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  16. - public Task HelloWorld_Windows_CLR(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  17. - {
  18. - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType);
  19. - }
  20. -
  21. [ConditionalTheory]
  22. [OSSkipCondition(OperatingSystems.Linux)]
  23. [OSSkipCondition(OperatingSystems.MacOSX)]
  24. + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")]
  25. [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  26. [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)]
  27. public Task HelloWorld_HttpSys(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  28. @@ -39,7 +31,6 @@ namespace ServerComparison.FunctionalTests
  29. }
  30. [ConditionalTheory]
  31. - [FrameworkSkipCondition(RuntimeFrameworks.CLR)]
  32. [OSSkipCondition(OperatingSystems.Linux)]
  33. [OSSkipCondition(OperatingSystems.MacOSX)]
  34. [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess)]
  35. @@ -52,6 +43,15 @@ namespace ServerComparison.FunctionalTests
  36. return HelloWorld(serverType, runtimeFlavor, architecture, applicationType, hostingModel: hostingModel);
  37. }
  38. + [ConditionalTheory]
  39. + [OSSkipCondition(OperatingSystems.Linux)]
  40. + [OSSkipCondition(OperatingSystems.MacOSX)]
  41. + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  42. + public Task HelloWorld_Kestrel_Clr(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  43. + {
  44. + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType);
  45. + }
  46. +
  47. [Theory]
  48. [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")]
  49. [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  50. diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs
  51. index 4086cb8232a..0c4c4ab89d1 100644
  52. --- a/test/ServerComparison.FunctionalTests/Helpers.cs
  53. +++ b/test/ServerComparison.FunctionalTests/Helpers.cs
  54. @@ -50,12 +50,7 @@ namespace ServerComparison.FunctionalTests
  55. {
  56. if (runtimeFlavor == RuntimeFlavor.Clr)
  57. {
  58. -#if NET461
  59. return "net461";
  60. -#elif NETCOREAPP2_0 || NETCOREAPP2_1
  61. -#else
  62. -#error Tests targeting CLR must be compiled only on desktop.
  63. -#endif
  64. }
  65. else if (runtimeFlavor == RuntimeFlavor.CoreClr)
  66. {
  67. @@ -68,7 +63,7 @@ namespace ServerComparison.FunctionalTests
  68. #endif
  69. }
  70. - throw new ArgumentException($"Unknown RuntimeFlavor '{runtimeFlavor}");
  71. + throw new ArgumentException($"Unknown RuntimeFlavor '{runtimeFlavor}'");
  72. }
  73. }
  74. }
  75. \ No newline at end of file
  76. diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs
  77. index ad906668fef..e1c4a6c96b5 100644
  78. --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs
  79. +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs
  80. @@ -1,6 +1,5 @@
  81. // Copyright (c) .NET Foundation. All rights reserved.
  82. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
  83. -#if NET461 // https://github.com/aspnet/ServerTests/issues/82
  84. using System.Net;
  85. using System.Net.Http;
  86. @@ -22,7 +21,6 @@ namespace ServerComparison.FunctionalTests
  87. }
  88. [ConditionalTheory]
  89. - [Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")]
  90. [OSSkipCondition(OperatingSystems.Linux)]
  91. [OSSkipCondition(OperatingSystems.MacOSX)]
  92. [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")]
  93. @@ -117,8 +115,4 @@ namespace ServerComparison.FunctionalTests
  94. }
  95. }
  96. }
  97. -}
  98. -#elif NETCOREAPP2_0 || NETCOREAPP2_1
  99. -#else
  100. -#error target frameworks need to be updated
  101. -#endif
  102. +}
  103. \ No newline at end of file
  104. diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs
  105. index 9553d49db1d..4c4c755191a 100644
  106. --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs
  107. +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs
  108. @@ -31,7 +31,8 @@ namespace ServerComparison.FunctionalTests
  109. }
  110. [ConditionalTheory]
  111. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  112. + [OSSkipCondition(OperatingSystems.Linux)]
  113. + [OSSkipCondition(OperatingSystems.MacOSX)]
  114. [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")]
  115. [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  116. [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)]
  117. @@ -41,7 +42,8 @@ namespace ServerComparison.FunctionalTests
  118. }
  119. [ConditionalTheory]
  120. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  121. + [OSSkipCondition(OperatingSystems.Linux)]
  122. + [OSSkipCondition(OperatingSystems.MacOSX)]
  123. [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  124. public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  125. {
  126. @@ -74,7 +76,6 @@ namespace ServerComparison.FunctionalTests
  127. }
  128. [ConditionalFact(Skip ="Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")]
  129. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  130. [OSSkipCondition(OperatingSystems.Linux)]
  131. [OSSkipCondition(OperatingSystems.MacOSX)]
  132. public Task ResponseCompression_IISExpress_HostCompression_CLR()
  133. @@ -92,7 +93,8 @@ namespace ServerComparison.FunctionalTests
  134. }
  135. [ConditionalFact]
  136. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  137. + [OSSkipCondition(OperatingSystems.Linux)]
  138. + [OSSkipCondition(OperatingSystems.MacOSX)]
  139. public Task ResponseCompression_Windows_AppCompression_CLR()
  140. {
  141. return ResponseCompression(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: false);
  142. @@ -132,7 +134,6 @@ namespace ServerComparison.FunctionalTests
  143. }
  144. [ConditionalFact(Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")]
  145. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  146. [OSSkipCondition(OperatingSystems.Linux)]
  147. [OSSkipCondition(OperatingSystems.MacOSX)]
  148. public Task ResponseCompression_Windows_AppAndHostCompression_CLR()
  149. diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs
  150. index 70e3305c9f1..18282592e59 100644
  151. --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs
  152. +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs
  153. @@ -25,7 +25,8 @@ namespace ServerComparison.FunctionalTests
  154. }
  155. [ConditionalTheory]
  156. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  157. + [OSSkipCondition(OperatingSystems.Linux)]
  158. + [OSSkipCondition(OperatingSystems.MacOSX)]
  159. [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")]
  160. [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  161. public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  162. @@ -51,7 +52,8 @@ namespace ServerComparison.FunctionalTests
  163. }
  164. [ConditionalTheory]
  165. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  166. + [OSSkipCondition(OperatingSystems.Linux)]
  167. + [OSSkipCondition(OperatingSystems.MacOSX)]
  168. [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  169. // IIS will remove the "Connection: close" header https://github.com/aspnet/IISIntegration/issues/7
  170. public Task ResponseFormats_Windows_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  171. @@ -61,7 +63,8 @@ namespace ServerComparison.FunctionalTests
  172. [ConditionalTheory]
  173. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  174. + [OSSkipCondition(OperatingSystems.Linux)]
  175. + [OSSkipCondition(OperatingSystems.MacOSX)]
  176. [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/WebListener/issues/259
  177. // IIS will remove the "Connection: close" header https://github.com/aspnet/IISIntegration/issues/7
  178. public Task ResponseFormats_Windows_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  179. @@ -86,7 +89,8 @@ namespace ServerComparison.FunctionalTests
  180. }
  181. [ConditionalTheory]
  182. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  183. + [OSSkipCondition(OperatingSystems.Linux)]
  184. + [OSSkipCondition(OperatingSystems.MacOSX)]
  185. [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")]
  186. [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  187. public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  188. @@ -112,7 +116,8 @@ namespace ServerComparison.FunctionalTests
  189. }
  190. [ConditionalTheory]
  191. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  192. + [OSSkipCondition(OperatingSystems.Linux)]
  193. + [OSSkipCondition(OperatingSystems.MacOSX)]
  194. [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")]
  195. [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  196. public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  197. @@ -138,7 +143,8 @@ namespace ServerComparison.FunctionalTests
  198. }
  199. [ConditionalTheory]
  200. - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)]
  201. + [OSSkipCondition(OperatingSystems.Linux)]
  202. + [OSSkipCondition(OperatingSystems.MacOSX)]
  203. // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/IISIntegration/issues/7
  204. [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)]
  205. public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType)
  206. diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj
  207. index fb1f789be3b..ba0fea38e1c 100644
  208. --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj
  209. +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj
  210. @@ -1,7 +1,8 @@
  211. <Project Sdk="Microsoft.NET.Sdk">
  212. <PropertyGroup>
  213. - <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
  214. + <!-- Use 2.1 to run the tests. The tests will select their own TFMs for the test application when publishing -->
  215. + <TargetFramework>netcoreapp2.1</TargetFramework>
  216. </PropertyGroup>
  217. <ItemGroup>