From 2391b41aa84cf00d9c0a8522e4f729332f74de0d Mon Sep 17 00:00:00 2001 From: Murat Girgin Date: Wed, 8 Apr 2015 13:05:24 -0700 Subject: [PATCH 001/291] Initial commit --- CONTRIBUTING.md | 4 ++++ LICENSE.txt | 12 ++++++++++++ README.md | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE.txt create mode 100644 README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..eac4268e4c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,4 @@ +Contributing +====== + +Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/master/CONTRIBUTING.md) in the Home repo. diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000000..d85a1524ad --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +these files except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000000..9b59669ad6 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +Server Tests +======== + +This repo hosts Helios, WebListener and Kesterl tests. + +This project is part of ASP.NET vNext. You can find samples, documentation and getting started instructions for ASP.NET vNext at the [Home](https://github.com/aspnet/home) repo. From d9c52d01cfdfc5d2cc5b64923dbb3fbedb681804 Mon Sep 17 00:00:00 2001 From: Murat Girgin Date: Wed, 8 Apr 2015 13:08:45 -0700 Subject: [PATCH 002/291] Updating readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b59669ad6..745c70d496 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Server Tests ======== -This repo hosts Helios, WebListener and Kesterl tests. +This repo hosts Helios, WebListener and Kestrel tests. This project is part of ASP.NET vNext. You can find samples, documentation and getting started instructions for ASP.NET vNext at the [Home](https://github.com/aspnet/home) repo. From 2461b00b025581e27fde034b6c49e1c7b551b203 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Wed, 8 Apr 2015 15:29:15 -0700 Subject: [PATCH 003/291] Basic build infrastructure. --- .gitattributes | 50 ++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 26 +++++++++++++++++++++++ NuGet.Config | 7 +++++++ NuGet.master.config | 7 +++++++ NuGet.release.config | 7 +++++++ build.cmd | 28 +++++++++++++++++++++++++ build.sh | 38 +++++++++++++++++++++++++++++++++ global.json | 3 +++ makefile.shade | 7 +++++++ 9 files changed, 173 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 NuGet.Config create mode 100644 NuGet.master.config create mode 100644 NuGet.release.config create mode 100644 build.cmd create mode 100644 build.sh create mode 100644 global.json create mode 100644 makefile.shade diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..bdaa5ba982 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,50 @@ +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain + +*.jpg binary +*.png binary +*.gif binary + +*.cs text=auto diff=csharp +*.vb text=auto +*.resx text=auto +*.c text=auto +*.cpp text=auto +*.cxx text=auto +*.h text=auto +*.hxx text=auto +*.py text=auto +*.rb text=auto +*.java text=auto +*.html text=auto +*.htm text=auto +*.css text=auto +*.scss text=auto +*.sass text=auto +*.less text=auto +*.js text=auto +*.lisp text=auto +*.clj text=auto +*.sql text=auto +*.php text=auto +*.lua text=auto +*.m text=auto +*.asm text=auto +*.erl text=auto +*.fs text=auto +*.fsx text=auto +*.hs text=auto + +*.csproj text=auto +*.vbproj text=auto +*.fsproj text=auto +*.dbproj text=auto +*.sln text=auto eol=crlf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..216e8d9c58 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +[Oo]bj/ +[Bb]in/ +TestResults/ +.nuget/ +*.sln.ide/ +_ReSharper.*/ +packages/ +artifacts/ +PublishProfiles/ +*.user +*.suo +*.cache +*.docstates +_ReSharper.* +nuget.exe +*net45.csproj +*net451.csproj +*k10.csproj +*.psess +*.vsp +*.pidb +*.userprefs +*DS_Store +*.ncrunchsolution +*.*sdf +*.ipch \ No newline at end of file diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000000..46c3b3e36c --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/NuGet.master.config b/NuGet.master.config new file mode 100644 index 0000000000..e2edffce48 --- /dev/null +++ b/NuGet.master.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/NuGet.release.config b/NuGet.release.config new file mode 100644 index 0000000000..1978dc065a --- /dev/null +++ b/NuGet.release.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/build.cmd b/build.cmd new file mode 100644 index 0000000000..41025afb26 --- /dev/null +++ b/build.cmd @@ -0,0 +1,28 @@ +@echo off +cd %~dp0 + +SETLOCAL +SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe + +IF EXIST %CACHED_NUGET% goto copynuget +echo Downloading latest version of NuGet.exe... +IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet +@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" + +:copynuget +IF EXIST .nuget\nuget.exe goto restore +md .nuget +copy %CACHED_NUGET% .nuget\nuget.exe > nul + +:restore +IF EXIST packages\KoreBuild goto run +.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre +.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion + +IF "%SKIP_DNX_INSTALL%"=="1" goto run +CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86 +CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86 + +:run +CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86 +packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %* diff --git a/build.sh b/build.sh new file mode 100644 index 0000000000..c8cc2a72e1 --- /dev/null +++ b/build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +if test `uname` = Darwin; then + cachedir=~/Library/Caches/KBuild +else + if [ -z $XDG_DATA_HOME ]; then + cachedir=$HOME/.local/share + else + cachedir=$XDG_DATA_HOME; + fi +fi +mkdir -p $cachedir + +url=https://www.nuget.org/nuget.exe + +if test ! -f $cachedir/nuget.exe; then + wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null +fi + +if test ! -e .nuget; then + mkdir .nuget + cp $cachedir/nuget.exe .nuget/nuget.exe +fi + +if test ! -d packages/KoreBuild; then + mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre + mono .nuget/nuget.exe install Sake -version 0.2 -o packages -ExcludeVersion +fi + +if ! type dnvm > /dev/null 2>&1; then + source packages/KoreBuild/build/dnvm.sh +fi + +if ! type dnx > /dev/null 2>&1; then + dnvm upgrade +fi + +mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@" diff --git a/global.json b/global.json new file mode 100644 index 0000000000..983ba0401e --- /dev/null +++ b/global.json @@ -0,0 +1,3 @@ +{ + "projects": ["src"] +} diff --git a/makefile.shade b/makefile.shade new file mode 100644 index 0000000000..562494d144 --- /dev/null +++ b/makefile.shade @@ -0,0 +1,7 @@ + +var VERSION='0.1' +var FULL_VERSION='0.1' +var AUTHORS='Microsoft Open Technologies, Inc.' + +use-standard-lifecycle +k-standard-goals From d034dbb3c7b6d05f77aa80ee4fbd6419b852b085 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Thu, 16 Apr 2015 10:38:05 -0700 Subject: [PATCH 004/291] Infrastructure and Hello World and NTLM tests. --- .gitignore | 3 +- ServerTests.sln | 41 + src/Placeholder/project.json | 2 + .../HelloWorldTest.cs | 123 ++ .../Helpers.cs | 24 + .../NtlmAuthentation.config | 1038 +++++++++++++++++ .../NtlmAuthentationTest.cs | 85 ++ .../ServerComparison.FunctionalTests.xproj | 20 + .../project.json | 23 + .../Properties/launchSettings.json | 11 + .../ServerComparison.TestSites.xproj | 19 + .../StartupHelloWorld.cs | 67 ++ .../StartupNtlmAuthentication.cs | 85 ++ test/ServerComparison.TestSites/config.json | 3 + test/ServerComparison.TestSites/project.json | 38 + 15 files changed, 1581 insertions(+), 1 deletion(-) create mode 100644 ServerTests.sln create mode 100644 src/Placeholder/project.json create mode 100644 test/ServerComparison.FunctionalTests/HelloWorldTest.cs create mode 100644 test/ServerComparison.FunctionalTests/Helpers.cs create mode 100644 test/ServerComparison.FunctionalTests/NtlmAuthentation.config create mode 100644 test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs create mode 100644 test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj create mode 100644 test/ServerComparison.FunctionalTests/project.json create mode 100644 test/ServerComparison.TestSites/Properties/launchSettings.json create mode 100644 test/ServerComparison.TestSites/ServerComparison.TestSites.xproj create mode 100644 test/ServerComparison.TestSites/StartupHelloWorld.cs create mode 100644 test/ServerComparison.TestSites/StartupNtlmAuthentication.cs create mode 100644 test/ServerComparison.TestSites/config.json create mode 100644 test/ServerComparison.TestSites/project.json diff --git a/.gitignore b/.gitignore index 216e8d9c58..be311a1f7d 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ nuget.exe *DS_Store *.ncrunchsolution *.*sdf -*.ipch \ No newline at end of file +*.ipch +project.lock.json \ No newline at end of file diff --git a/ServerTests.sln b/ServerTests.sln new file mode 100644 index 0000000000..7a7cebf0a7 --- /dev/null +++ b/ServerTests.sln @@ -0,0 +1,41 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22807.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5B0A1907-2525-4081-AE14-255D3CE65B62}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" + ProjectSection(SolutionItems) = preProject + global.json = global.json + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FA91F388-F4AF-4850-9D68-D4D128E6B1A6}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.FunctionalTests", "test\ServerComparison.FunctionalTests\ServerComparison.FunctionalTests.xproj", "{A319ACCE-060B-4385-9534-9F2202F6180E}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.TestSites", "test\ServerComparison.TestSites\ServerComparison.TestSites.xproj", "{030225D8-4EE8-47E5-B692-2A96B3B51A38}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A319ACCE-060B-4385-9534-9F2202F6180E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A319ACCE-060B-4385-9534-9F2202F6180E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A319ACCE-060B-4385-9534-9F2202F6180E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A319ACCE-060B-4385-9534-9F2202F6180E}.Release|Any CPU.Build.0 = Release|Any CPU + {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Debug|Any CPU.Build.0 = Debug|Any CPU + {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Release|Any CPU.ActiveCfg = Release|Any CPU + {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A319ACCE-060B-4385-9534-9F2202F6180E} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} + {030225D8-4EE8-47E5-B692-2A96B3B51A38} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} + EndGlobalSection +EndGlobal diff --git a/src/Placeholder/project.json b/src/Placeholder/project.json new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/src/Placeholder/project.json @@ -0,0 +1,2 @@ +{ +} diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs new file mode 100644 index 0000000000..77f9c631b1 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Diagnostics; +using System.Net.Http; +using System.Threading.Tasks; +using DeploymentHelpers; +using Microsoft.AspNet.Testing.xunit; +using Microsoft.Framework.Logging; +using Xunit; + +namespace ServerComparison.FunctionalTests +{ + // Uses ports ranging 5061 - 5069. + public class HelloWorldTests + { + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5061/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5062/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5063/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5064/")] + public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5065/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5066/")] + public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + } + + [ConditionalTheory] + [FrameworkSkipCondition(RuntimeFrameworks.DotNet)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x86, "http://localhost:5067/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x64, "http://localhost:5068/")] + public Task HelloWorld_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + } + + [ConditionalTheory] + [SkipIfIISVariationsNotEnabled] + [OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Unix)] + [SkipIfCurrentRuntimeIsCoreClr] + [InlineData(ServerType.IIS, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5069/")] + [InlineData(ServerType.IIS, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5070/")] + public Task HelloWorld_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + } + + [ConditionalTheory] + [SkipIfIISNativeVariationsNotEnabled] + [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] + [SkipIfCurrentRuntimeIsCoreClr] + [InlineData(ServerType.IISNativeModule, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5071/")] + public Task HelloWorld_NativeModule_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + } + + [ConditionalTheory] + [SkipIfIISNativeVariationsNotEnabled] + [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] + [SkipOn32BitOS] + [SkipIfCurrentRuntimeIsCoreClr] + [InlineData(ServerType.IISNativeModule, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5072/")] + public Task HelloWorld_NativeModule_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + } + + public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + var logger = new LoggerFactory() + .AddConsole() + .CreateLogger(string.Format("HelloWorld:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); + + using (logger.BeginScope("HelloWorldTest")) + { + var stopwatch = Stopwatch.StartNew(); + + logger.LogInformation("Variation Details : HostType = {hostType}, RuntimeFlavor = {flavor}, Architecture = {arch}, applicationBaseUrl = {appBase}", + serverType, runtimeFlavor, architecture, applicationBaseUrl); + + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) + { + ApplicationBaseUriHint = applicationBaseUrl, + EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld' + }; + + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + { + var deploymentResult = deployer.Deploy(); + var httpClientHandler = new HttpClientHandler(); + var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + + HttpResponseMessage response = null; + + // Request to base address and check if various parts of the body are rendered & measure the cold startup time. + RetryHelper.RetryRequest(() => + { + response = httpClient.GetAsync(string.Empty).Result; + return response; + }, logger: logger); + + logger.LogInformation("[Time]: Approximate time taken for application initialization : '{t}' seconds", stopwatch.Elapsed.TotalSeconds); + + var responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal("Hello World", responseText); + + stopwatch.Stop(); + logger.LogInformation("[Time]: Total time taken for this test variation '{t}' seconds", stopwatch.Elapsed.TotalSeconds); + } + } + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs new file mode 100644 index 0000000000..f2900bec3f --- /dev/null +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.IO; + +namespace ServerComparison.FunctionalTests +{ + public class Helpers + { + public static bool RunningOnMono + { + get + { + return Type.GetType("Mono.Runtime") != null; + } + } + + public static string GetApplicationPath() + { + return Path.GetFullPath(Path.Combine("..", "ServerComparison.TestSites")); + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentation.config b/test/ServerComparison.FunctionalTests/NtlmAuthentation.config new file mode 100644 index 0000000000..b639cc4091 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentation.config @@ -0,0 +1,1038 @@ + + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs new file mode 100644 index 0000000000..01b1d67629 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Diagnostics; +using System.IO; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using DeploymentHelpers; +using Microsoft.AspNet.Testing.xunit; +using Microsoft.Framework.Logging; +using Xunit; + +namespace ServerComparison.FunctionalTests +{ + // Uses ports ranging 5050 - 5060. + public class NtlmAuthenticationTests + { + [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] + [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5050/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5051/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5052/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5052/")] + public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + var logger = new LoggerFactory() + .AddConsole() + .CreateLogger(string.Format("Ntlm:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); + + using (logger.BeginScope("NtlmAuthenticationTest")) + { + var stopwatch = Stopwatch.StartNew(); + + logger.LogInformation("Variation Details : HostType = {hostType}, RuntimeFlavor = {flavor}, Architecture = {arch}, applicationBaseUrl = {appBase}", + serverType, runtimeFlavor, architecture, applicationBaseUrl); + + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) + { + ApplicationBaseUriHint = applicationBaseUrl, + EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' + ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, + SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config + }; + + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + { + var deploymentResult = deployer.Deploy(); + var httpClientHandler = new HttpClientHandler(); + var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + + HttpResponseMessage response = null; + + // Request to base address and check if various parts of the body are rendered & measure the cold startup time. + RetryHelper.RetryRequest(() => + { + response = httpClient.GetAsync(string.Empty).Result; + return response; + }, logger: logger); + + logger.LogInformation("[Time]: Approximate time taken for application initialization : '{t}' seconds", stopwatch.Elapsed.TotalSeconds); + + var responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal("Hello World", responseText); + + responseText = await httpClient.GetStringAsync("/Anonymous"); + Assert.Equal("Anonymous?True", responseText); + + response = await httpClient.GetAsync("/Restricted"); + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); + + httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; + httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + responseText = await httpClient.GetStringAsync("/Restricted"); + Assert.Equal("NotAnonymous", responseText); + + stopwatch.Stop(); + logger.LogInformation("[Time]: Total time taken for this test variation '{t}' seconds", stopwatch.Elapsed.TotalSeconds); + } + } + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj new file mode 100644 index 0000000000..9474f8e79c --- /dev/null +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj @@ -0,0 +1,20 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + a319acce-060b-4385-9534-9f2202f6180e + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + 2.0 + + + + + + \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json new file mode 100644 index 0000000000..274a0fd662 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/project.json @@ -0,0 +1,23 @@ +{ + "compilationOptions": { + "warningsAsErrors": "true" + }, + "commands": { + "test": "xunit.runner.aspnet" + }, + "dependencies": { + "DeploymentHelpers": "1.0.0-*", + "Microsoft.AspNet.Server.IIS": "1.0.0-*", + "Microsoft.Framework.Logging.Console": "1.0.0-*", + "xunit.runner.aspnet": "2.0.0-aspnet-*" + }, + "frameworks": { + "dnx451": { + "frameworkAssemblies": { + "System.Data": "", + "System.Net.Http": "", + "System.Xml": "" + } + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites/Properties/launchSettings.json b/test/ServerComparison.TestSites/Properties/launchSettings.json new file mode 100644 index 0000000000..b111483280 --- /dev/null +++ b/test/ServerComparison.TestSites/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNET_ENV": "HelloWorld" + } + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj new file mode 100644 index 0000000000..be51354920 --- /dev/null +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj @@ -0,0 +1,19 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 030225d8-4ee8-47e5-b692-2a96b3b51a38 + ServerComparison.TestSites + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + 2.0 + 49212 + + + \ No newline at end of file diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs new file mode 100644 index 0000000000..ba97b49cb0 --- /dev/null +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Diagnostics; +using Microsoft.AspNet.Http; +using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.DependencyInjection; +using Microsoft.Framework.Logging; +using Microsoft.Framework.Runtime; + +namespace ServerComparison.TestSites +{ + /// + /// To make runtime to load an environment based startup class, specify the environment by the following ways: + /// 1. Drop a Microsoft.AspNet.Hosting.ini file in the wwwroot folder + /// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named + /// 'StartupHelloWorld' the value of the env should be 'NtlmAuthentication' (eg. ASPNET_ENV=HelloWorld). Runtime adds a 'Startup' prefix to this and loads 'StartupHelloWorld'. + /// If no environment name is specified the default startup class loaded is 'Startup'. + /// Alternative ways to specify environment are: + /// 1. Set the environment variable named SET ASPNET_ENV=HelloWorld + /// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg: + /// "commands": { + /// "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV HelloWorld", + /// }, + /// + public class StartupHelloWorld + { + public StartupHelloWorld(IApplicationEnvironment env) + { + //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, + //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. + Configuration = new Configuration(env.ApplicationBasePath) + .AddJsonFile("config.json") + .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. + } + + public IConfiguration Configuration { get; private set; } + + public void ConfigureServices(IServiceCollection services) + { + // services.Configure(Configuration.GetSubKey("AppSettings")); + } + + public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) + { + loggerFactory.AddConsole(minLevel: LogLevel.Warning); + + // Error page middleware displays a nice formatted HTML page for any unhandled exceptions in the request pipeline. + // Note: ErrorPageOptions.ShowAll to be used only at development time. Not recommended for production. + app.UseErrorPage(ErrorPageOptions.ShowAll); + + // Add the runtime information page that can be used by developers + // to see what packages are used by the application + // default path is: /runtimeinfo + app.UseRuntimeInfoPage(); + + // Add static files to the request pipeline + // app.UseStaticFiles(); + + app.Run(ctx => + { + return ctx.Response.WriteAsync("Hello World"); + }); + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs new file mode 100644 index 0000000000..7c82dd74a1 --- /dev/null +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Threading.Tasks; +using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Diagnostics; +using Microsoft.AspNet.Http; +using Microsoft.AspNet.Server.WebListener; +using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.DependencyInjection; +using Microsoft.Framework.Logging; +using Microsoft.Framework.Runtime; +using Microsoft.Net.Http.Server; + +namespace ServerComparison.TestSites +{ + /// + /// To make runtime to load an environment based startup class, specify the environment by the following ways: + /// 1. Drop a Microsoft.AspNet.Hosting.ini file in the wwwroot folder + /// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named + /// 'StartupNtlmAuthentication' the value of the env should be 'NtlmAuthentication' (eg. ASPNET_ENV=NtlmAuthentication). Runtime adds a 'Startup' prefix to this and loads 'StartupNtlmAuthentication'. + /// If no environment name is specified the default startup class loaded is 'Startup'. + /// Alternative ways to specify environment are: + /// 1. Set the environment variable named SET ASPNET_ENV=NtlmAuthentication + /// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg: + /// "commands": { + /// "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV NtlmAuthentication", + /// }, + /// + public class StartupNtlmAuthentication + { + public StartupNtlmAuthentication(IApplicationEnvironment env) + { + //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, + //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. + Configuration = new Configuration(env.ApplicationBasePath) + .AddJsonFile("config.json") + .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. + } + + public IConfiguration Configuration { get; private set; } + + public void ConfigureServices(IServiceCollection services) + { + } + + public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) + { + loggerFactory.AddConsole(minLevel: LogLevel.Warning); + + app.UseErrorPage(ErrorPageOptions.ShowAll); + + // Set up NTLM authentication for WebListener like below. + // For IIS and IISExpress: Use inetmgr to setup NTLM authentication on the application vDir or modify the applicationHost.config to enable NTLM. + if ((app.Server as ServerInformation) != null) + { + var serverInformation = (ServerInformation)app.Server; + serverInformation.Listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; + } + + app.Use((context, next) => + { + if (context.Request.Path.Equals(new PathString("/Anonymous"))) + { + return context.Response.WriteAsync("Anonymous?" + !context.User.Identity.IsAuthenticated); + } + + if (context.Request.Path.Equals(new PathString("/Restricted"))) + { + if (context.User.Identity.IsAuthenticated) + { + return context.Response.WriteAsync("NotAnonymous"); + } + else + { + context.Response.Challenge(); + return Task.FromResult(0); + } + } + + return context.Response.WriteAsync("Hello World"); + }); + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites/config.json b/test/ServerComparison.TestSites/config.json new file mode 100644 index 0000000000..d177980a92 --- /dev/null +++ b/test/ServerComparison.TestSites/config.json @@ -0,0 +1,3 @@ +{ + +} diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json new file mode 100644 index 0000000000..ea0420a18c --- /dev/null +++ b/test/ServerComparison.TestSites/project.json @@ -0,0 +1,38 @@ +{ + "webroot": "wwwroot", + "version": "1.0.0-*", + + "dependencies": { + "Kestrel": "1.0.0-*", + "Microsoft.AspNet.Diagnostics": "1.0.0-*", + "Microsoft.AspNet.Http.Core": "1.0.0-*", + "Microsoft.AspNet.Server.IIS": "1.0.0-*", + "Microsoft.AspNet.Server.WebListener": "1.0.0-*", + "Microsoft.AspNet.WebUtilities": "1.0.0-*", + "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*", + "Microsoft.Framework.Logging.Console": "1.0.0-*" + }, + + "commands": { + "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener", + "kestrel": "Microsoft.AspNet.Hosting --server Kestrel" + }, + + "frameworks": { + "dnx451": { }, + "dnxcore50": { } + }, + + "publishExclude": [ + "node_modules", + "bower_components", + "**.xproj", + "**.user", + "**.vspscc" + ], + "exclude": [ + "wwwroot", + "node_modules", + "bower_components" + ] +} From 54a8d8f8de575ddcdf7779b06051c43d77c26f01 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Thu, 16 Apr 2015 16:23:22 -0700 Subject: [PATCH 005/291] Change to async retry helper. --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 9 +++------ .../NtlmAuthentationTest.cs | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 77f9c631b1..724f8df513 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -100,14 +100,11 @@ namespace ServerComparison.FunctionalTests var httpClientHandler = new HttpClientHandler(); var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; - HttpResponseMessage response = null; - // Request to base address and check if various parts of the body are rendered & measure the cold startup time. - RetryHelper.RetryRequest(() => + var response = await RetryHelper.RetryRequest(() => { - response = httpClient.GetAsync(string.Empty).Result; - return response; - }, logger: logger); + return httpClient.GetAsync(string.Empty); + }, logger, deploymentResult.HostShutdownToken); logger.LogInformation("[Time]: Approximate time taken for application initialization : '{t}' seconds", stopwatch.Elapsed.TotalSeconds); diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 01b1d67629..4b13376170 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -50,14 +50,11 @@ namespace ServerComparison.FunctionalTests var httpClientHandler = new HttpClientHandler(); var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; - HttpResponseMessage response = null; - // Request to base address and check if various parts of the body are rendered & measure the cold startup time. - RetryHelper.RetryRequest(() => + var response = await RetryHelper.RetryRequest(() => { - response = httpClient.GetAsync(string.Empty).Result; - return response; - }, logger: logger); + return httpClient.GetAsync(string.Empty); + }, logger, deploymentResult.HostShutdownToken); logger.LogInformation("[Time]: Approximate time taken for application initialization : '{t}' seconds", stopwatch.Elapsed.TotalSeconds); From 870c430f8fd28811f1088e188cf00279cc98152a Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Tue, 21 Apr 2015 13:12:16 -0700 Subject: [PATCH 006/291] Consume the checked in DeploymentHelpers. --- build.cmd | 2 + global.json | 2 +- .../HelloWorldTest.cs | 39 +++++++------------ .../NtlmAuthentationTest.cs | 21 +++------- .../project.json | 2 +- .../StartupHelloWorld.cs | 2 +- 6 files changed, 24 insertions(+), 44 deletions(-) diff --git a/build.cmd b/build.cmd index 41025afb26..812d058e94 100644 --- a/build.cmd +++ b/build.cmd @@ -21,7 +21,9 @@ IF EXIST packages\KoreBuild goto run IF "%SKIP_DNX_INSTALL%"=="1" goto run CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86 +CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x64 CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86 +CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64 :run CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86 diff --git a/global.json b/global.json index 983ba0401e..d9b4ed63ae 100644 --- a/global.json +++ b/global.json @@ -1,3 +1,3 @@ { - "projects": ["src"] + "projects": [ "src" ] } diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 724f8df513..ace78b0eaf 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -2,10 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Diagnostics; using System.Net.Http; using System.Threading.Tasks; -using DeploymentHelpers; +using Microsoft.AspNet.Server.Testing; using Microsoft.AspNet.Testing.xunit; using Microsoft.Framework.Logging; using Xunit; @@ -17,27 +16,27 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory] [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5061/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5062/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5063/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5064/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/")] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5065/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5066/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/")] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.DotNet)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x86, "http://localhost:5067/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x64, "http://localhost:5068/")] + [FrameworkSkipCondition(RuntimeFrameworks.CLR)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5067/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x64, "http://localhost:5068/")] public Task HelloWorld_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); @@ -47,8 +46,8 @@ namespace ServerComparison.FunctionalTests [SkipIfIISVariationsNotEnabled] [OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Unix)] [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IIS, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5069/")] - [InlineData(ServerType.IIS, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5070/")] + [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5069/")] + [InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/")] public Task HelloWorld_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); @@ -58,7 +57,7 @@ namespace ServerComparison.FunctionalTests [SkipIfIISNativeVariationsNotEnabled] [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IISNativeModule, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5071/")] + [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] public Task HelloWorld_NativeModule_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); @@ -69,7 +68,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] [SkipOn32BitOS] [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IISNativeModule, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5072/")] + [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5072/")] public Task HelloWorld_NativeModule_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); @@ -83,11 +82,6 @@ namespace ServerComparison.FunctionalTests using (logger.BeginScope("HelloWorldTest")) { - var stopwatch = Stopwatch.StartNew(); - - logger.LogInformation("Variation Details : HostType = {hostType}, RuntimeFlavor = {flavor}, Architecture = {arch}, applicationBaseUrl = {appBase}", - serverType, runtimeFlavor, architecture, applicationBaseUrl); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, @@ -106,13 +100,8 @@ namespace ServerComparison.FunctionalTests return httpClient.GetAsync(string.Empty); }, logger, deploymentResult.HostShutdownToken); - logger.LogInformation("[Time]: Approximate time taken for application initialization : '{t}' seconds", stopwatch.Elapsed.TotalSeconds); - var responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Hello World", responseText); - - stopwatch.Stop(); - logger.LogInformation("[Time]: Total time taken for this test variation '{t}' seconds", stopwatch.Elapsed.TotalSeconds); } } } diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 4b13376170..dd73ecee40 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -2,12 +2,11 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Diagnostics; using System.IO; using System.Net; using System.Net.Http; using System.Threading.Tasks; -using DeploymentHelpers; +using Microsoft.AspNet.Server.Testing; using Microsoft.AspNet.Testing.xunit; using Microsoft.Framework.Logging; using Xunit; @@ -19,10 +18,10 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5050/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5051/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5052/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5052/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var logger = new LoggerFactory() @@ -31,11 +30,6 @@ namespace ServerComparison.FunctionalTests using (logger.BeginScope("NtlmAuthenticationTest")) { - var stopwatch = Stopwatch.StartNew(); - - logger.LogInformation("Variation Details : HostType = {hostType}, RuntimeFlavor = {flavor}, Architecture = {arch}, applicationBaseUrl = {appBase}", - serverType, runtimeFlavor, architecture, applicationBaseUrl); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, @@ -56,8 +50,6 @@ namespace ServerComparison.FunctionalTests return httpClient.GetAsync(string.Empty); }, logger, deploymentResult.HostShutdownToken); - logger.LogInformation("[Time]: Approximate time taken for application initialization : '{t}' seconds", stopwatch.Elapsed.TotalSeconds); - var responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Hello World", responseText); @@ -72,9 +64,6 @@ namespace ServerComparison.FunctionalTests httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; responseText = await httpClient.GetStringAsync("/Restricted"); Assert.Equal("NotAnonymous", responseText); - - stopwatch.Stop(); - logger.LogInformation("[Time]: Total time taken for this test variation '{t}' seconds", stopwatch.Elapsed.TotalSeconds); } } } diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 274a0fd662..3313f26c4d 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -6,8 +6,8 @@ "test": "xunit.runner.aspnet" }, "dependencies": { - "DeploymentHelpers": "1.0.0-*", "Microsoft.AspNet.Server.IIS": "1.0.0-*", + "Microsoft.AspNet.Server.Testing": "1.0.0-*", "Microsoft.Framework.Logging.Console": "1.0.0-*", "xunit.runner.aspnet": "2.0.0-aspnet-*" }, diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index ba97b49cb0..06b340c152 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -15,7 +15,7 @@ namespace ServerComparison.TestSites /// To make runtime to load an environment based startup class, specify the environment by the following ways: /// 1. Drop a Microsoft.AspNet.Hosting.ini file in the wwwroot folder /// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named - /// 'StartupHelloWorld' the value of the env should be 'NtlmAuthentication' (eg. ASPNET_ENV=HelloWorld). Runtime adds a 'Startup' prefix to this and loads 'StartupHelloWorld'. + /// 'StartupHelloWorld' the value of the env should be 'HelloWorld' (eg. ASPNET_ENV=HelloWorld). Runtime adds a 'Startup' prefix to this and loads 'StartupHelloWorld'. /// If no environment name is specified the default startup class loaded is 'Startup'. /// Alternative ways to specify environment are: /// 1. Set the environment variable named SET ASPNET_ENV=HelloWorld From b64618bc2d29720a52ce6cc3c4f9dda482f54b87 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Fri, 24 Apr 2015 09:55:14 -0700 Subject: [PATCH 007/291] React to auth API changes. Remove extra dependencies. --- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 4 +--- test/ServerComparison.TestSites/project.json | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 7c82dd74a1..e0211f0de3 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -48,8 +48,6 @@ namespace ServerComparison.TestSites { loggerFactory.AddConsole(minLevel: LogLevel.Warning); - app.UseErrorPage(ErrorPageOptions.ShowAll); - // Set up NTLM authentication for WebListener like below. // For IIS and IISExpress: Use inetmgr to setup NTLM authentication on the application vDir or modify the applicationHost.config to enable NTLM. if ((app.Server as ServerInformation) != null) @@ -73,7 +71,7 @@ namespace ServerComparison.TestSites } else { - context.Response.Challenge(); + context.Authentication.Challenge(); return Task.FromResult(0); } } diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index ea0420a18c..54221edb94 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -4,8 +4,6 @@ "dependencies": { "Kestrel": "1.0.0-*", - "Microsoft.AspNet.Diagnostics": "1.0.0-*", - "Microsoft.AspNet.Http.Core": "1.0.0-*", "Microsoft.AspNet.Server.IIS": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*", From 33de44b596fa046823e18213b6324dcbdccc5c91 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Fri, 24 Apr 2015 10:21:38 -0700 Subject: [PATCH 008/291] Remove references to diagnostics. --- .../ServerComparison.TestSites/StartupHelloWorld.cs | 13 ------------- .../StartupNtlmAuthentication.cs | 1 - 2 files changed, 14 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index 06b340c152..003ad68d37 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Diagnostics; using Microsoft.AspNet.Http; using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; @@ -46,18 +45,6 @@ namespace ServerComparison.TestSites { loggerFactory.AddConsole(minLevel: LogLevel.Warning); - // Error page middleware displays a nice formatted HTML page for any unhandled exceptions in the request pipeline. - // Note: ErrorPageOptions.ShowAll to be used only at development time. Not recommended for production. - app.UseErrorPage(ErrorPageOptions.ShowAll); - - // Add the runtime information page that can be used by developers - // to see what packages are used by the application - // default path is: /runtimeinfo - app.UseRuntimeInfoPage(); - - // Add static files to the request pipeline - // app.UseStaticFiles(); - app.Run(ctx => { return ctx.Response.WriteAsync("Hello World"); diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index e0211f0de3..8ed52d13da 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Diagnostics; using Microsoft.AspNet.Http; using Microsoft.AspNet.Server.WebListener; using Microsoft.Framework.ConfigurationModel; From 34cbd2805b69b6509f1ebfd67a83aee8c1063754 Mon Sep 17 00:00:00 2001 From: Troy Dai Date: Fri, 24 Apr 2015 22:00:42 -0700 Subject: [PATCH 009/291] React to OperationSystems change --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 8 ++++---- .../NtlmAuthentationTest.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index ace78b0eaf..ec97d90eda 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -15,7 +15,7 @@ namespace ServerComparison.FunctionalTests public class HelloWorldTests { [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] @@ -44,7 +44,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [SkipIfIISVariationsNotEnabled] - [OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Unix)] + [OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Linux)] [SkipIfCurrentRuntimeIsCoreClr] [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5069/")] [InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/")] @@ -55,7 +55,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [SkipIfIISNativeVariationsNotEnabled] - [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] + [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Linux)] [SkipIfCurrentRuntimeIsCoreClr] [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] public Task HelloWorld_NativeModule_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) @@ -65,7 +65,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [SkipIfIISNativeVariationsNotEnabled] - [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] + [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Linux)] [SkipOn32BitOS] [SkipIfCurrentRuntimeIsCoreClr] [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5072/")] diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index dd73ecee40..49775c8e37 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -17,7 +17,7 @@ namespace ServerComparison.FunctionalTests public class NtlmAuthenticationTests { [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] - [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] From af70779d1b844d9e87643874549e7a2cd8dba58c Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Fri, 1 May 2015 14:00:32 -0700 Subject: [PATCH 010/291] Update LICENSE.txt and license header on files. --- LICENSE.txt | 2 +- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- test/ServerComparison.FunctionalTests/Helpers.cs | 2 +- test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs | 2 +- test/ServerComparison.TestSites/StartupHelloWorld.cs | 2 +- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index d85a1524ad..0bdc1962b6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +Copyright (c) .NET Foundation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index ec97d90eda..ddbfdfe02b 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index f2900bec3f..388420bbb5 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 49775c8e37..226bc7fbe9 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index 003ad68d37..cb4f090f58 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Builder; diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 8ed52d13da..de60db8042 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; From a5daae325ed9883f6b00e938707920c582db668f Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 4 May 2015 15:55:32 -0700 Subject: [PATCH 011/291] Add tests for response body formats (chunked, content-length, close, etc.). --- .../ResponseTests.cs | 214 ++++++++++++++++++ .../StartupResponses.cs | 59 +++++ test/ServerComparison.TestSites/project.json | 3 +- 3 files changed, 275 insertions(+), 1 deletion(-) create mode 100644 test/ServerComparison.FunctionalTests/ResponseTests.cs create mode 100644 test/ServerComparison.TestSites/StartupResponses.cs diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs new file mode 100644 index 0000000000..b106f38fb7 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -0,0 +1,214 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.AspNet.Server.Testing; +using Microsoft.AspNet.Testing.xunit; +using Microsoft.Framework.Logging; +using Microsoft.Net.Http.Headers; +using Xunit; +using Xunit.Sdk; + +namespace ServerComparison.FunctionalTests +{ + // Uses ports ranging 5070 - 5079. + public class ResponseTests + { + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); + } + + // [ConditionalTheory] + // [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + // TODO: Not supported [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] + // https://github.com/aspnet/Helios/issues/148 + // TODO: Chunks anyways [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + // https://github.com/aspnet/WebListener/issues/113 + public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + public Task ResponseFormats_Kestrel_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + } + + // [Theory] + // TODO: Not implemented [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + // https://github.com/aspnet/KestrelHttpServer/issues/97 + public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + // TODO: Not implemented [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + // https://github.com/aspnet/WebListener/issues/112 + public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); + } + + public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario) + { + var logger = new LoggerFactory() + .AddConsole() + .CreateLogger(string.Format("ResponseFormats:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); + + using (logger.BeginScope("ResponseFormatsTest")) + { + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) + { + ApplicationBaseUriHint = applicationBaseUrl, + EnvironmentName = "Responses", + }; + + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + { + var deploymentResult = deployer.Deploy(); + var httpClientHandler = new HttpClientHandler(); + var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + + // Request to base address and check if various parts of the body are rendered & measure the cold startup time. + var response = await RetryHelper.RetryRequest(() => + { + return httpClient.GetAsync(string.Empty); + }, logger, deploymentResult.HostShutdownToken); + + var responseText = await response.Content.ReadAsStringAsync(); + try + { + Assert.Equal("Running", responseText); + } + catch (XunitException) + { + logger.LogWarning(responseText); + throw; + } + + await scenario(httpClient, logger); + } + } + } + + private static async Task CheckContentLengthAsync(HttpClient client, ILogger logger) + { + string responseText = string.Empty; + try + { + var response = await client.GetAsync("contentlength"); + responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal("Content Length", responseText); + Assert.Null(response.Headers.TransferEncodingChunked); + Assert.Null(response.Headers.ConnectionClose); + Assert.Equal("14", GetContentLength(response)); + } + catch (XunitException) + { + logger.LogWarning(responseText); + throw; + } + } + + private static async Task CheckConnectionCloseAsync(HttpClient client, ILogger logger) + { + string responseText = string.Empty; + try + { + var response = await client.GetAsync("connectionclose"); + responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal("Connnection Close", responseText); + Assert.Null(response.Headers.TransferEncodingChunked); + Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?"); + Assert.Null(GetContentLength(response)); + } + catch (XunitException) + { + logger.LogWarning(responseText); + throw; + } + } + + private static async Task CheckChunkedAsync(HttpClient client, ILogger logger) + { + string responseText = string.Empty; + try + { + var response = await client.GetAsync("chunked"); + responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal("Chunked", responseText); + Assert.True(response.Headers.TransferEncodingChunked, "/chunked, chunked?"); + Assert.Null(response.Headers.ConnectionClose); + Assert.Null(GetContentLength(response)); + } + catch (XunitException) + { + logger.LogWarning(responseText); + throw; + } + } + + private static async Task CheckManuallyChunkedAsync(HttpClient client, ILogger logger) + { + string responseText = string.Empty; + try + { + var response = await client.GetAsync("manuallychunked"); + responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal("Manually Chunked", responseText); + Assert.True(response.Headers.TransferEncodingChunked, "/manuallychunked, chunked?"); + Assert.Null(response.Headers.ConnectionClose); + Assert.Null(GetContentLength(response)); + } + catch (XunitException) + { + logger.LogWarning(responseText); + throw; + } + } + + private static string GetContentLength(HttpResponseMessage response) + { + // Don't use response.Content.Headers.ContentLength, it will dynamically calculate the value if it can. + IEnumerable values; + return response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out values) ? values.FirstOrDefault() : null; + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites/StartupResponses.cs b/test/ServerComparison.TestSites/StartupResponses.cs new file mode 100644 index 0000000000..563fdd0894 --- /dev/null +++ b/test/ServerComparison.TestSites/StartupResponses.cs @@ -0,0 +1,59 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Http; +using Microsoft.Framework.Logging; +using Microsoft.Net.Http.Headers; + +namespace ServerComparison.TestSites +{ + public class StartupResponses + { + public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) + { + loggerFactory.AddConsole(minLevel: LogLevel.Warning); + + app.Map("/contentlength", subApp => + { + subApp.Run(context => + { + context.Response.ContentLength = 14; + return context.Response.WriteAsync("Content Length"); + }); + }); + + app.Map("/connectionclose", subApp => + { + subApp.Run(context => + { + context.Response.Headers[HeaderNames.Connection] = "close"; + return context.Response.WriteAsync("Connnection Close"); + }); + }); + + app.Map("/chunked", subApp => + { + subApp.Run(async context => + { + await context.Response.WriteAsync("Chunked"); + await context.Response.Body.FlushAsync(); // Bypass IIS write-behind buffering + }); + }); + + app.Map("/manuallychunked", subApp => + { + subApp.Run(context => + { + context.Response.Headers[HeaderNames.TransferEncoding] = "chunked"; + return context.Response.WriteAsync("10\r\nManually Chunked\r\n0\r\n\r\n"); + }); + }); + + app.Run(context => + { + return context.Response.WriteAsync("Running"); + }); + } + } +} diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 54221edb94..abf1079926 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -8,7 +8,8 @@ "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*", "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*", - "Microsoft.Framework.Logging.Console": "1.0.0-*" + "Microsoft.Framework.Logging.Console": "1.0.0-*", + "Microsoft.Net.Http.Headers": "1.0.0-*" }, "commands": { From eaecffb9d75ca4d60ac692dc44993fe8ce465e51 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 11 May 2015 09:08:56 -0700 Subject: [PATCH 012/291] Enable IIS connection: close test. --- test/ServerComparison.FunctionalTests/ResponseTests.cs | 8 ++++---- test/ServerComparison.TestSites/StartupResponses.cs | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index b106f38fb7..d7b14ce3b0 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -34,9 +34,9 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); } - // [ConditionalTheory] - // [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // TODO: Not supported [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] // https://github.com/aspnet/Helios/issues/148 // TODO: Chunks anyways [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] // https://github.com/aspnet/WebListener/issues/113 @@ -155,8 +155,8 @@ namespace ServerComparison.FunctionalTests var response = await client.GetAsync("connectionclose"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Connnection Close", responseText); - Assert.Null(response.Headers.TransferEncodingChunked); Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?"); + Assert.Null(response.Headers.TransferEncodingChunked); Assert.Null(GetContentLength(response)); } catch (XunitException) diff --git a/test/ServerComparison.TestSites/StartupResponses.cs b/test/ServerComparison.TestSites/StartupResponses.cs index 563fdd0894..67fc0800ab 100644 --- a/test/ServerComparison.TestSites/StartupResponses.cs +++ b/test/ServerComparison.TestSites/StartupResponses.cs @@ -25,10 +25,11 @@ namespace ServerComparison.TestSites app.Map("/connectionclose", subApp => { - subApp.Run(context => + subApp.Run(async context => { context.Response.Headers[HeaderNames.Connection] = "close"; - return context.Response.WriteAsync("Connnection Close"); + await context.Response.WriteAsync("Connnection Close"); + await context.Response.Body.FlushAsync(); // Bypass IIS write-behind buffering }); }); From 7dd670e1920f34fcf586d7c4c3300ae1cc930441 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 11 May 2015 09:19:52 -0700 Subject: [PATCH 013/291] #4 Disable parallel test execution. --- .../Properties/AssemblyInfo.cs | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs diff --git a/test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs b/test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..b1fa884228 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using Xunit; + +[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)] \ No newline at end of file From 9b5a47662294c5a25e3e904d3a884484be950c7f Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 11 May 2015 09:41:25 -0700 Subject: [PATCH 014/291] #4 Add logging to debug flaky tests. --- .../HelloWorldTest.cs | 12 +++++++- .../NtlmAuthentationTest.cs | 30 ++++++++++++------- .../ResponseTests.cs | 25 ++++++++-------- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index ddbfdfe02b..6c2807fa2c 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Server.Testing; using Microsoft.AspNet.Testing.xunit; using Microsoft.Framework.Logging; using Xunit; +using Xunit.Sdk; namespace ServerComparison.FunctionalTests { @@ -101,7 +102,16 @@ namespace ServerComparison.FunctionalTests }, logger, deploymentResult.HostShutdownToken); var responseText = await response.Content.ReadAsStringAsync(); - Assert.Equal("Hello World", responseText); + try + { + Assert.Equal("Hello World", responseText); + } + catch (XunitException) + { + logger.LogWarning(response.ToString()); + logger.LogWarning(responseText); + throw; + } } } } diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 226bc7fbe9..c9fc8e42c1 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -10,6 +10,7 @@ using Microsoft.AspNet.Server.Testing; using Microsoft.AspNet.Testing.xunit; using Microsoft.Framework.Logging; using Xunit; +using Xunit.Sdk; namespace ServerComparison.FunctionalTests { @@ -51,19 +52,28 @@ namespace ServerComparison.FunctionalTests }, logger, deploymentResult.HostShutdownToken); var responseText = await response.Content.ReadAsStringAsync(); - Assert.Equal("Hello World", responseText); + try + { + Assert.Equal("Hello World", responseText); - responseText = await httpClient.GetStringAsync("/Anonymous"); - Assert.Equal("Anonymous?True", responseText); + responseText = await httpClient.GetStringAsync("/Anonymous"); + Assert.Equal("Anonymous?True", responseText); - response = await httpClient.GetAsync("/Restricted"); - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); - Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); + response = await httpClient.GetAsync("/Restricted"); + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); - httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; - httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; - responseText = await httpClient.GetStringAsync("/Restricted"); - Assert.Equal("NotAnonymous", responseText); + httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; + httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + responseText = await httpClient.GetStringAsync("/Restricted"); + Assert.Equal("NotAnonymous", responseText); + } + catch (XunitException) + { + logger.LogWarning(response.ToString()); + logger.LogWarning(responseText); + throw; + } } } } diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index d7b14ce3b0..1a5a247853 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -119,6 +119,7 @@ namespace ServerComparison.FunctionalTests } catch (XunitException) { + logger.LogWarning(response.ToString()); logger.LogWarning(responseText); throw; } @@ -130,11 +131,10 @@ namespace ServerComparison.FunctionalTests private static async Task CheckContentLengthAsync(HttpClient client, ILogger logger) { - string responseText = string.Empty; + var response = await client.GetAsync("contentlength"); + var responseText = await response.Content.ReadAsStringAsync(); try { - var response = await client.GetAsync("contentlength"); - responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Content Length", responseText); Assert.Null(response.Headers.TransferEncodingChunked); Assert.Null(response.Headers.ConnectionClose); @@ -142,6 +142,7 @@ namespace ServerComparison.FunctionalTests } catch (XunitException) { + logger.LogWarning(response.ToString()); logger.LogWarning(responseText); throw; } @@ -149,11 +150,10 @@ namespace ServerComparison.FunctionalTests private static async Task CheckConnectionCloseAsync(HttpClient client, ILogger logger) { - string responseText = string.Empty; + var response = await client.GetAsync("connectionclose"); + var responseText = await response.Content.ReadAsStringAsync(); try { - var response = await client.GetAsync("connectionclose"); - responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Connnection Close", responseText); Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?"); Assert.Null(response.Headers.TransferEncodingChunked); @@ -161,6 +161,7 @@ namespace ServerComparison.FunctionalTests } catch (XunitException) { + logger.LogWarning(response.ToString()); logger.LogWarning(responseText); throw; } @@ -168,11 +169,10 @@ namespace ServerComparison.FunctionalTests private static async Task CheckChunkedAsync(HttpClient client, ILogger logger) { - string responseText = string.Empty; + var response = await client.GetAsync("chunked"); + var responseText = await response.Content.ReadAsStringAsync(); try { - var response = await client.GetAsync("chunked"); - responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Chunked", responseText); Assert.True(response.Headers.TransferEncodingChunked, "/chunked, chunked?"); Assert.Null(response.Headers.ConnectionClose); @@ -180,6 +180,7 @@ namespace ServerComparison.FunctionalTests } catch (XunitException) { + logger.LogWarning(response.ToString()); logger.LogWarning(responseText); throw; } @@ -187,11 +188,10 @@ namespace ServerComparison.FunctionalTests private static async Task CheckManuallyChunkedAsync(HttpClient client, ILogger logger) { - string responseText = string.Empty; + var response = await client.GetAsync("manuallychunked"); + var responseText = await response.Content.ReadAsStringAsync(); try { - var response = await client.GetAsync("manuallychunked"); - responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Manually Chunked", responseText); Assert.True(response.Headers.TransferEncodingChunked, "/manuallychunked, chunked?"); Assert.Null(response.Headers.ConnectionClose); @@ -199,6 +199,7 @@ namespace ServerComparison.FunctionalTests } catch (XunitException) { + logger.LogWarning(response.ToString()); logger.LogWarning(responseText); throw; } From e84f35bc2d9ac309d87405f6e4abc5c5911dd7f7 Mon Sep 17 00:00:00 2001 From: Eilon Lipton Date: Tue, 12 May 2015 11:53:44 -0700 Subject: [PATCH 015/291] Update Home master -> Home dev --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eac4268e4c..64ff041d5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ Contributing ====== -Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/master/CONTRIBUTING.md) in the Home repo. +Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo. From 7ae1941c839882f43ddeafe7a57c5823f8ad074a Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 13 May 2015 14:14:01 -0700 Subject: [PATCH 016/291] Enable additional WebListener response tests. --- .../ResponseTests.cs | 42 ++++++++++++++++--- .../StartupResponses.cs | 10 +++++ 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 1a5a247853..992c16d76a 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -37,9 +37,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] - // https://github.com/aspnet/Helios/issues/148 - // TODO: Chunks anyways [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] - // https://github.com/aspnet/WebListener/issues/113 + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); @@ -72,8 +70,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] - // TODO: Not implemented [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] - // https://github.com/aspnet/WebListener/issues/112 + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); @@ -86,6 +83,22 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); } + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5077/")] + public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5078/")] + public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); + } + public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario) { var logger = new LoggerFactory() @@ -205,6 +218,25 @@ namespace ServerComparison.FunctionalTests } } + private static async Task CheckManuallyChunkedAndCloseAsync(HttpClient client, ILogger logger) + { + var response = await client.GetAsync("manuallychunkedandclose"); + var responseText = await response.Content.ReadAsStringAsync(); + try + { + Assert.Equal("Manually Chunked and Close", responseText); + Assert.True(response.Headers.TransferEncodingChunked, "/manuallychunkedandclose, chunked?"); + Assert.True(response.Headers.ConnectionClose, "/manuallychunkedandclose, closed?"); + Assert.Null(GetContentLength(response)); + } + catch (XunitException) + { + logger.LogWarning(response.ToString()); + logger.LogWarning(responseText); + throw; + } + } + private static string GetContentLength(HttpResponseMessage response) { // Don't use response.Content.Headers.ContentLength, it will dynamically calculate the value if it can. diff --git a/test/ServerComparison.TestSites/StartupResponses.cs b/test/ServerComparison.TestSites/StartupResponses.cs index 67fc0800ab..a71c3968f6 100644 --- a/test/ServerComparison.TestSites/StartupResponses.cs +++ b/test/ServerComparison.TestSites/StartupResponses.cs @@ -51,6 +51,16 @@ namespace ServerComparison.TestSites }); }); + app.Map("/manuallychunkedandclose", subApp => + { + subApp.Run(context => + { + context.Response.Headers[HeaderNames.Connection] = "close"; + context.Response.Headers[HeaderNames.TransferEncoding] = "chunked"; + return context.Response.WriteAsync("1A\r\nManually Chunked and Close\r\n0\r\n\r\n"); + }); + }); + app.Run(context => { return context.Response.WriteAsync("Running"); From 56e563909dfe6e0eeab1cc4db954f45da11836f0 Mon Sep 17 00:00:00 2001 From: Kirthi Krishnamraju Date: Wed, 20 May 2015 18:10:48 -0700 Subject: [PATCH 017/291] React to aspnet/Configuration #195,#198 --- test/ServerComparison.TestSites/StartupHelloWorld.cs | 4 ++-- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 4 ++-- test/ServerComparison.TestSites/project.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index cb4f090f58..c23e377049 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -3,7 +3,7 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; -using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; using Microsoft.Framework.Runtime; @@ -29,7 +29,7 @@ namespace ServerComparison.TestSites { //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. - Configuration = new Configuration(env.ApplicationBasePath) + Configuration = new ConfigurationSection(env.ApplicationBasePath) .AddJsonFile("config.json") .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. } diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index de60db8042..48575f3030 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using Microsoft.AspNet.Server.WebListener; -using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; using Microsoft.Framework.Runtime; @@ -32,7 +32,7 @@ namespace ServerComparison.TestSites { //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. - Configuration = new Configuration(env.ApplicationBasePath) + Configuration = new ConfigurationSection(env.ApplicationBasePath) .AddJsonFile("config.json") .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. } diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index abf1079926..49c5b98a62 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -7,7 +7,7 @@ "Microsoft.AspNet.Server.IIS": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*", - "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*", + "Microsoft.Framework.Configuration.Json": "1.0.0-*", "Microsoft.Framework.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, From ef0be7ca75fcab4eeb04cfe1bc914d15809fe371 Mon Sep 17 00:00:00 2001 From: Hisham Abdullah Bin Ateya Date: Thu, 21 May 2015 06:23:44 +0300 Subject: [PATCH 018/291] ASP.NET vNext -> ASP.NET 5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 745c70d496..265e25bcdb 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ Server Tests This repo hosts Helios, WebListener and Kestrel tests. -This project is part of ASP.NET vNext. You can find samples, documentation and getting started instructions for ASP.NET vNext at the [Home](https://github.com/aspnet/home) repo. +This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo. From 0abe9e2b1fa3242043576ee133f45e62cae71a1d Mon Sep 17 00:00:00 2001 From: Kirthi Krishnamraju Date: Fri, 22 May 2015 05:21:32 -0700 Subject: [PATCH 019/291] React to aspnet/Configuration #194 --- test/ServerComparison.TestSites/StartupHelloWorld.cs | 3 ++- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index c23e377049..dd0a419a68 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -29,9 +29,10 @@ namespace ServerComparison.TestSites { //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. - Configuration = new ConfigurationSection(env.ApplicationBasePath) + var builder = new ConfigurationBuilder(env.ApplicationBasePath) .AddJsonFile("config.json") .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. + Configuration = builder.Build(); } public IConfiguration Configuration { get; private set; } diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 48575f3030..294ed28cad 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -32,9 +32,10 @@ namespace ServerComparison.TestSites { //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. - Configuration = new ConfigurationSection(env.ApplicationBasePath) + var builder = new ConfigurationBuilder(env.ApplicationBasePath) .AddJsonFile("config.json") .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. + Configuration = builder.Build(); } public IConfiguration Configuration { get; private set; } From c8eb49d71d1ee9f28202db10d0e9c1e52eb999f4 Mon Sep 17 00:00:00 2001 From: Hisham Abdullah Bin Ateya Date: Sat, 20 Jun 2015 23:57:57 +0300 Subject: [PATCH 020/291] Add AppVeyor, Travis build status --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 265e25bcdb..20b98a98bd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ Server Tests ======== +AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/pjthuqdls1quaifx/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnetci/ServerTests/branch/dev) + +Travis: [![Travis](https://travis-ci.org/aspnet/ServerTests.svg?branch=dev)](https://travis-ci.org/aspnet/ServerTests) + This repo hosts Helios, WebListener and Kestrel tests. This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo. From c77f3978d4ddb079e4d6b93e1a504927ad51fd48 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Tue, 23 Jun 2015 16:52:04 -0700 Subject: [PATCH 021/291] Change hardcoded `bash` shebang to `env` - aspnet/Home#695 - support various ash installation locations - in particular, enable building on FreeBSD --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index c8cc2a72e1..203b034a33 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if test `uname` = Darwin; then cachedir=~/Library/Caches/KBuild From 981d040cc254dd15c5022c4d9cfd216501efdb87 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 25 Jun 2015 17:36:51 -0700 Subject: [PATCH 022/291] Fix build --- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 294ed28cad..fbccb64f7a 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -56,7 +56,7 @@ namespace ServerComparison.TestSites serverInformation.Listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; } - app.Use((context, next) => + app.Use((context, next) => { if (context.Request.Path.Equals(new PathString("/Anonymous"))) { @@ -71,8 +71,7 @@ namespace ServerComparison.TestSites } else { - context.Authentication.Challenge(); - return Task.FromResult(0); + return context.Authentication.ChallengeAsync(); } } From 96edf5ae9879e2e727476a1f2d03b4730b4b9d01 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 25 Jun 2015 17:41:56 -0700 Subject: [PATCH 023/291] Fix test to match WebListener --- test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index c9fc8e42c1..26c435397a 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -60,7 +60,7 @@ namespace ServerComparison.FunctionalTests Assert.Equal("Anonymous?True", responseText); response = await httpClient.GetAsync("/Restricted"); - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; From 83f7a4423f29bb12e4dc2df47151a67b4d3282c5 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 25 Jun 2015 17:56:37 -0700 Subject: [PATCH 024/291] undo test fix --- test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 26c435397a..c9fc8e42c1 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -60,7 +60,7 @@ namespace ServerComparison.FunctionalTests Assert.Equal("Anonymous?True", responseText); response = await httpClient.GetAsync("/Restricted"); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; From 0b72d43cfa13fc59fbbf08b085521e0b25713d72 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 25 Jun 2015 18:02:35 -0700 Subject: [PATCH 025/291] Make test happy for now --- .../NtlmAuthentationTest.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index c9fc8e42c1..e690f80f1e 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -60,7 +60,16 @@ namespace ServerComparison.FunctionalTests Assert.Equal("Anonymous?True", responseText); response = await httpClient.GetAsync("/Restricted"); - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + + // REVIEW: figure out why this is different on IIS + if (serverType == ServerType.IISExpress) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + } + else + { + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + } Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; From 67bd48fab21cbdc9461cd8c7bc9bfa00c84272b5 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 25 Jun 2015 18:14:19 -0700 Subject: [PATCH 026/291] Disable iisexpress ntlm tests for now --- .../NtlmAuthentationTest.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index e690f80f1e..42ca2ca52a 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -19,8 +19,9 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] + // TODO: Figure out why IISExpress failing + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] + //[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) @@ -61,15 +62,7 @@ namespace ServerComparison.FunctionalTests response = await httpClient.GetAsync("/Restricted"); - // REVIEW: figure out why this is different on IIS - if (serverType == ServerType.IISExpress) - { - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - } - else - { - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); - } + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; From a7a1ea59bfd1be60cb1b92dd64319272f0885e2c Mon Sep 17 00:00:00 2001 From: Chris R Date: Fri, 10 Jul 2015 14:36:39 -0700 Subject: [PATCH 027/291] #8 re-enable and expand NTLM tests. --- .../NtlmAuthentationTest.cs | 47 +++++++++++++++++-- .../StartupNtlmAuthentication.cs | 43 +++++++++++++++-- 2 files changed, 81 insertions(+), 9 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 42ca2ca52a..71ac3ae5a9 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -19,9 +19,8 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // TODO: Figure out why IISExpress failing - //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] - //[InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) @@ -61,14 +60,52 @@ namespace ServerComparison.FunctionalTests Assert.Equal("Anonymous?True", responseText); response = await httpClient.GetAsync("/Restricted"); - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); + Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); + + response = await httpClient.GetAsync("/RestrictedNTLM"); + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); + // Note IIS can't restrict a challenge to a specific auth type, the native auth modules always add themselves. + // However WebListener can. + if (serverType == ServerType.WebListener) + { + Assert.DoesNotContain("Negotiate", response.Headers.WwwAuthenticate.ToString()); + } + else if (serverType == ServerType.IISExpress) + { + Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); + } + + response = await httpClient.GetAsync("/Forbidden"); + Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + + response = await httpClient.GetAsync("/AutoForbid"); + Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); + responseText = await httpClient.GetStringAsync("/Restricted"); - Assert.Equal("NotAnonymous", responseText); + Assert.Equal("Negotiate", responseText); + + responseText = await httpClient.GetStringAsync("/RestrictedNegotiate"); + Assert.Equal("Negotiate", responseText); + + if (serverType == ServerType.WebListener) + { + responseText = await httpClient.GetStringAsync("/RestrictedNTLM"); + Assert.Equal("NTLM", responseText); + } + else if (serverType == ServerType.IISExpress) + { + response = await httpClient.GetAsync("/RestrictedNTLM"); + // This isn't a Forbidden because we authenticate with Negotiate and challenge for NTLM. + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + // Note IIS can't restrict a challenge to a specific auth type, the native auth modules always add themselves, + // so both Negotiate and NTLM get sent again. + } } catch (XunitException) { diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index fbccb64f7a..a03b4c30c7 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -53,21 +53,22 @@ namespace ServerComparison.TestSites if ((app.Server as ServerInformation) != null) { var serverInformation = (ServerInformation)app.Server; - serverInformation.Listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; + serverInformation.Listener.AuthenticationManager.AuthenticationSchemes = + AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; } app.Use((context, next) => { - if (context.Request.Path.Equals(new PathString("/Anonymous"))) + if (context.Request.Path.Equals("/Anonymous")) { return context.Response.WriteAsync("Anonymous?" + !context.User.Identity.IsAuthenticated); } - if (context.Request.Path.Equals(new PathString("/Restricted"))) + if (context.Request.Path.Equals("/Restricted")) { if (context.User.Identity.IsAuthenticated) { - return context.Response.WriteAsync("NotAnonymous"); + return context.Response.WriteAsync(context.User.Identity.AuthenticationType); } else { @@ -75,6 +76,40 @@ namespace ServerComparison.TestSites } } + if (context.Request.Path.Equals("/Forbidden")) + { + return context.Authentication.ForbidAsync(string.Empty); + } + + if (context.Request.Path.Equals("/AutoForbid")) + { + return context.Authentication.ChallengeAsync(); + } + + if (context.Request.Path.Equals("/RestrictedNegotiate")) + { + if (string.Equals("Negotiate", context.User.Identity.AuthenticationType, System.StringComparison.Ordinal)) + { + return context.Response.WriteAsync("Negotiate"); + } + else + { + return context.Authentication.ChallengeAsync("Negotiate"); + } + } + + if (context.Request.Path.Equals("/RestrictedNTLM")) + { + if (string.Equals("NTLM", context.User.Identity.AuthenticationType, System.StringComparison.Ordinal)) + { + return context.Response.WriteAsync("NTLM"); + } + else + { + return context.Authentication.ChallengeAsync("NTLM"); + } + } + return context.Response.WriteAsync("Hello World"); }); } From 322fd0ff9233a738cb601c73c733412bcf5188f4 Mon Sep 17 00:00:00 2001 From: Victor Hurdugaci Date: Wed, 29 Jul 2015 01:48:15 -0700 Subject: [PATCH 028/291] Fix namespaces --- test/ServerComparison.TestSites/StartupHelloWorld.cs | 2 +- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index dd0a419a68..476ec14c77 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -3,10 +3,10 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; +using Microsoft.Dnx.Runtime; using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; -using Microsoft.Framework.Runtime; namespace ServerComparison.TestSites { diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index a03b4c30c7..104061fca7 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -1,14 +1,13 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using Microsoft.AspNet.Server.WebListener; +using Microsoft.Dnx.Runtime; using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; -using Microsoft.Framework.Runtime; using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites From e48cf0a91bd9915261301565cd8d99ab5b0f5961 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Wed, 12 Aug 2015 12:22:11 -0700 Subject: [PATCH 029/291] React to Kestrel rename aspnet/KestrelHttpServer#11 --- test/ServerComparison.TestSites/project.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 49c5b98a62..dc73dcfee3 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -3,7 +3,7 @@ "version": "1.0.0-*", "dependencies": { - "Kestrel": "1.0.0-*", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.Server.IIS": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*", @@ -14,7 +14,7 @@ "commands": { "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener", - "kestrel": "Microsoft.AspNet.Hosting --server Kestrel" + "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel" }, "frameworks": { From 8e046a035bc0b5c513db978a2548c1899560d0b9 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Fri, 14 Aug 2015 16:28:12 -0700 Subject: [PATCH 030/291] Enable ResponseFormats_Kestrel_Chunked test https://github.com/aspnet/KestrelHttpServer/issues/97 --- test/ServerComparison.FunctionalTests/ResponseTests.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 992c16d76a..f35f6b7305 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -59,9 +59,8 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); } - // [Theory] - // TODO: Not implemented [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] - // https://github.com/aspnet/KestrelHttpServer/issues/97 + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); From d1ecd8e29b472384389d9f2ca44022fdb1c5bb9c Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 17 Aug 2015 14:48:48 -0700 Subject: [PATCH 031/291] Updating to release NuGet.config. --- NuGet.Config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index 46c3b3e36c..222ebf7828 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,7 +1,7 @@ - + - + From a8c4ea24259a2ad9a28e242fc36f0f8dc2bff823 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 18 Aug 2015 14:00:23 -0700 Subject: [PATCH 032/291] Updating to aspnetliterelease. --- NuGet.Config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.Config b/NuGet.Config index 222ebf7828..08a8a4b55c 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,7 +1,7 @@ - + From cc82be0b1879a09467d21b15df4ee2edb3f5ecd9 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 18 Aug 2015 14:00:23 -0700 Subject: [PATCH 033/291] Updating to aspnetlitedev. --- NuGet.Config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index 46c3b3e36c..5f5695ac3d 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,7 +1,7 @@ - + - + From 56988150ae98dfdfb4a1710dd9a323340296fc7b Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Wed, 19 Aug 2015 14:54:25 -0700 Subject: [PATCH 034/291] Update NuGet feed from v2 => v3. --- NuGet.Config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.Config b/NuGet.Config index 5f5695ac3d..56d86acac0 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -2,6 +2,6 @@ - + From 1fe48fef58026f5651164aab6345efbed4deae99 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 20 Aug 2015 15:38:00 -0700 Subject: [PATCH 035/291] Update 'build.cmd' to pull Sake from v2 NuGet feed. --- build.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.cmd b/build.cmd index 812d058e94..2c0c23e760 100644 --- a/build.cmd +++ b/build.cmd @@ -17,7 +17,7 @@ copy %CACHED_NUGET% .nuget\nuget.exe > nul :restore IF EXIST packages\KoreBuild goto run .nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre -.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion +.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages IF "%SKIP_DNX_INSTALL%"=="1" goto run CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86 From c1108dd1632d913d1d8aa60513deaf7a81214cda Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 20 Aug 2015 20:46:50 -0700 Subject: [PATCH 036/291] Update 'build.sh' to pull Sake from v2 NuGet feed. --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 203b034a33..fd756bc44b 100644 --- a/build.sh +++ b/build.sh @@ -24,7 +24,7 @@ fi if test ! -d packages/KoreBuild; then mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre - mono .nuget/nuget.exe install Sake -version 0.2 -o packages -ExcludeVersion + mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages fi if ! type dnvm > /dev/null 2>&1; then From 809ce8c11dd45ec02f359c624671ee03ece07dfa Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 1 Sep 2015 16:25:13 -0700 Subject: [PATCH 037/291] React to IAppBuilder.Server API change. --- .../StartupNtlmAuthentication.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 104061fca7..b2584e3a9b 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -3,6 +3,7 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; +using Microsoft.AspNet.Http.Features; using Microsoft.AspNet.Server.WebListener; using Microsoft.Dnx.Runtime; using Microsoft.Framework.Configuration; @@ -49,10 +50,10 @@ namespace ServerComparison.TestSites // Set up NTLM authentication for WebListener like below. // For IIS and IISExpress: Use inetmgr to setup NTLM authentication on the application vDir or modify the applicationHost.config to enable NTLM. - if ((app.Server as ServerInformation) != null) + var listener = app.ServerFeatures.Get(); + if (listener != null) { - var serverInformation = (ServerInformation)app.Server; - serverInformation.Listener.AuthenticationManager.AuthenticationSchemes = + listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; } From 89b97f9479d16dad0b3c16b786ce934f21614d33 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Wed, 2 Sep 2015 15:34:36 -0700 Subject: [PATCH 038/291] Update project.json to have warningsAsErrors accept a bool. --- test/ServerComparison.FunctionalTests/project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 3313f26c4d..a217f8722e 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -1,6 +1,6 @@ { "compilationOptions": { - "warningsAsErrors": "true" + "warningsAsErrors": true }, "commands": { "test": "xunit.runner.aspnet" From 208332b8315fce6750b38bfda4e7957ad8f013a2 Mon Sep 17 00:00:00 2001 From: Hisham Abdullah Bin Ateya Date: Fri, 4 Sep 2015 19:36:06 +0300 Subject: [PATCH 039/291] Remove unused 'RunningOnMono' property --- test/ServerComparison.FunctionalTests/Helpers.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 388420bbb5..07c493bd6a 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -8,14 +8,6 @@ namespace ServerComparison.FunctionalTests { public class Helpers { - public static bool RunningOnMono - { - get - { - return Type.GetType("Mono.Runtime") != null; - } - } - public static string GetApplicationPath() { return Path.GetFullPath(Path.Combine("..", "ServerComparison.TestSites")); From c30abd347781ea755a16beea62c407e68305dc5f Mon Sep 17 00:00:00 2001 From: Victor Hurdugaci Date: Fri, 4 Sep 2015 23:29:21 -0700 Subject: [PATCH 040/291] Add a framework to the empty project to unblock the build --- src/Placeholder/project.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Placeholder/project.json b/src/Placeholder/project.json index 2c63c08510..2e3b9ded68 100644 --- a/src/Placeholder/project.json +++ b/src/Placeholder/project.json @@ -1,2 +1,5 @@ { + "frameworks": { + "dnx451": {} + } } From ee461654ed51b10a4eb9778a3d5256858fe67042 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 17 Sep 2015 18:33:03 -0700 Subject: [PATCH 041/291] Update nuget.exe and corresponding feeds to v3. --- NuGet.Config => NuGet.config | 2 +- build.cmd | 25 +++++++++++++++++-------- build.sh | 13 ++++++++----- 3 files changed, 26 insertions(+), 14 deletions(-) rename NuGet.Config => NuGet.config (89%) mode change 100644 => 100755 build.sh diff --git a/NuGet.Config b/NuGet.config similarity index 89% rename from NuGet.Config rename to NuGet.config index 56d86acac0..52bf414192 100644 --- a/NuGet.Config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + diff --git a/build.cmd b/build.cmd index 2c0c23e760..177997c42e 100644 --- a/build.cmd +++ b/build.cmd @@ -2,12 +2,15 @@ cd %~dp0 SETLOCAL -SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe +SET NUGET_VERSION=latest +SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe +SET BUILDCMD_KOREBUILD_VERSION="" +SET BUILDCMD_DNX_VERSION="" IF EXIST %CACHED_NUGET% goto copynuget echo Downloading latest version of NuGet.exe... IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet -@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" +@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'" :copynuget IF EXIST .nuget\nuget.exe goto restore @@ -16,15 +19,21 @@ copy %CACHED_NUGET% .nuget\nuget.exe > nul :restore IF EXIST packages\KoreBuild goto run -.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre -.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages +IF %BUILDCMD_KOREBUILD_VERSION%=="" ( + .nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre +) ELSE ( + .nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre +) +.nuget\nuget.exe install Sake -ExcludeVersion -Out packages IF "%SKIP_DNX_INSTALL%"=="1" goto run -CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86 -CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x64 +IF %BUILDCMD_DNX_VERSION%=="" ( + CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86 +) ELSE ( + CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default +) CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86 -CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64 :run CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86 -packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %* +packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %* \ No newline at end of file diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index fd756bc44b..0c66139817 --- a/build.sh +++ b/build.sh @@ -10,21 +10,23 @@ else fi fi mkdir -p $cachedir +nugetVersion=latest +cachePath=$cachedir/nuget.$nugetVersion.exe -url=https://www.nuget.org/nuget.exe +url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe -if test ! -f $cachedir/nuget.exe; then - wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null +if test ! -f $cachePath; then + wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null fi if test ! -e .nuget; then mkdir .nuget - cp $cachedir/nuget.exe .nuget/nuget.exe + cp $cachePath .nuget/nuget.exe fi if test ! -d packages/KoreBuild; then mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre - mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages + mono .nuget/nuget.exe install Sake -ExcludeVersion -Out packages fi if ! type dnvm > /dev/null 2>&1; then @@ -36,3 +38,4 @@ if ! type dnx > /dev/null 2>&1; then fi mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@" + From 985a261ae8dfa1f3f44e518f0e2e05c6a8c182b4 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 21 Sep 2015 12:39:18 -0700 Subject: [PATCH 042/291] Disable IISExpress tests. --- .../ServerComparison.FunctionalTests/HelloWorldTest.cs | 4 ++-- .../NtlmAuthentationTest.cs | 4 ++-- test/ServerComparison.FunctionalTests/ResponseTests.cs | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 6c2807fa2c..76427021bd 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -17,8 +17,8 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/")] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 71ac3ae5a9..5bc9d3ea7e 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -19,8 +19,8 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index f35f6b7305..6f58e41255 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -20,7 +20,7 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -36,7 +36,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -52,7 +52,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -68,7 +68,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -84,7 +84,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5077/")] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { From 3e733348ea02f5b54c64afd45315945a973036e7 Mon Sep 17 00:00:00 2001 From: Chris R Date: Fri, 25 Sep 2015 06:53:15 -0700 Subject: [PATCH 043/291] React to configuration API changes. --- .../StartupHelloWorld.cs | 20 ------------------- .../StartupNtlmAuthentication.cs | 20 ------------------- 2 files changed, 40 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index 476ec14c77..85e7b693ef 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -3,9 +3,6 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; -using Microsoft.Dnx.Runtime; -using Microsoft.Framework.Configuration; -using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; namespace ServerComparison.TestSites @@ -25,23 +22,6 @@ namespace ServerComparison.TestSites /// public class StartupHelloWorld { - public StartupHelloWorld(IApplicationEnvironment env) - { - //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, - //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. - var builder = new ConfigurationBuilder(env.ApplicationBasePath) - .AddJsonFile("config.json") - .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. - Configuration = builder.Build(); - } - - public IConfiguration Configuration { get; private set; } - - public void ConfigureServices(IServiceCollection services) - { - // services.Configure(Configuration.GetSubKey("AppSettings")); - } - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(minLevel: LogLevel.Warning); diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index b2584e3a9b..fb8f64e6c8 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -4,10 +4,6 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Features; -using Microsoft.AspNet.Server.WebListener; -using Microsoft.Dnx.Runtime; -using Microsoft.Framework.Configuration; -using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; using Microsoft.Net.Http.Server; @@ -28,22 +24,6 @@ namespace ServerComparison.TestSites /// public class StartupNtlmAuthentication { - public StartupNtlmAuthentication(IApplicationEnvironment env) - { - //Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, - //then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. - var builder = new ConfigurationBuilder(env.ApplicationBasePath) - .AddJsonFile("config.json") - .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. - Configuration = builder.Build(); - } - - public IConfiguration Configuration { get; private set; } - - public void ConfigureServices(IServiceCollection services) - { - } - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(minLevel: LogLevel.Warning); From 03d6eb836703e6b4936dd198624ed4f62bc1629b Mon Sep 17 00:00:00 2001 From: Chris R Date: Sat, 26 Sep 2015 22:30:33 -0700 Subject: [PATCH 044/291] Re-enable IISExpress tests using HttpPlatformHandler. --- build.cmd | 2 ++ .../HelloWorldTest.cs | 25 ++----------------- .../NtlmAuthentationTest.cs | 1 + .../ResponseTests.cs | 10 ++++---- test/ServerComparison.TestSites/config.json | 3 --- test/ServerComparison.TestSites/project.json | 6 ++--- 6 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 test/ServerComparison.TestSites/config.json diff --git a/build.cmd b/build.cmd index 177997c42e..422bf80656 100644 --- a/build.cmd +++ b/build.cmd @@ -32,7 +32,9 @@ IF %BUILDCMD_DNX_VERSION%=="" ( ) ELSE ( CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default ) +CALL packages\KoreBuild\build\dnvm install default -arch x64 CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86 +CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64 :run CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86 diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 76427021bd..024ecbb56e 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -17,8 +17,8 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/")] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) @@ -54,27 +54,6 @@ namespace ServerComparison.FunctionalTests return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } - [ConditionalTheory] - [SkipIfIISNativeVariationsNotEnabled] - [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Linux)] - [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] - public Task HelloWorld_NativeModule_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) - { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); - } - - [ConditionalTheory] - [SkipIfIISNativeVariationsNotEnabled] - [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Linux)] - [SkipOn32BitOS] - [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5072/")] - public Task HelloWorld_NativeModule_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) - { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); - } - public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var logger = new LoggerFactory() diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 5bc9d3ea7e..950cd37568 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -19,6 +19,7 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + // TODO: https://github.com/aspnet/IISIntegration/issues/1 // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 6f58e41255..f35f6b7305 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -20,7 +20,7 @@ namespace ServerComparison.FunctionalTests { [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -36,7 +36,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -52,7 +52,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -68,7 +68,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -84,7 +84,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5077/")] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { diff --git a/test/ServerComparison.TestSites/config.json b/test/ServerComparison.TestSites/config.json deleted file mode 100644 index d177980a92..0000000000 --- a/test/ServerComparison.TestSites/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index dc73dcfee3..fb19470526 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -3,8 +3,8 @@ "version": "1.0.0-*", "dependencies": { + "Microsoft.AspNet.PlatformHandler": "1.0.0-*", "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Server.IIS": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*", "Microsoft.Framework.Configuration.Json": "1.0.0-*", @@ -13,8 +13,8 @@ }, "commands": { - "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel" + "web": "Microsoft.AspNet.Server.WebListener", + "kestrel": "Microsoft.AspNet.Server.Kestrel" }, "frameworks": { From 673617f3dd19479b54674ad1e37fd47dd4a3d26f Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 28 Sep 2015 14:03:00 -0700 Subject: [PATCH 045/291] Always specify the ApplicationHost.Config file. --- .../HelloWorldTest.cs | 6 +- .../Http.config | 1029 +++++++++++++++++ .../NtlmAuthentationTest.cs | 1 + .../ResponseTests.cs | 4 + test/ServerComparison.TestSites/project.json | 2 +- 5 files changed, 1040 insertions(+), 2 deletions(-) create mode 100644 test/ServerComparison.FunctionalTests/Http.config diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 024ecbb56e..8593aed187 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.IO; using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNet.Server.Testing; @@ -65,7 +66,10 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, - EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld' + Command = serverType == ServerType.WebListener ? "web" : "kestrel", + EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', + ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, + SiteName = "HttpTestSite", // This is configured in the Http.config }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.FunctionalTests/Http.config b/test/ServerComparison.FunctionalTests/Http.config new file mode 100644 index 0000000000..b1b08c8b1d --- /dev/null +++ b/test/ServerComparison.FunctionalTests/Http.config @@ -0,0 +1,1029 @@ + + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 950cd37568..44327bf96f 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -35,6 +35,7 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, + Command = serverType == ServerType.WebListener ? "web" : "kestrel", EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index f35f6b7305..29a95bb9e8 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; @@ -110,6 +111,9 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", + Command = serverType == ServerType.WebListener ? "web" : "kestrel", + ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, + SiteName = "HttpTestSite", // This is configured in the Http.config }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index fb19470526..bfe3a08bb3 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -3,7 +3,7 @@ "version": "1.0.0-*", "dependencies": { - "Microsoft.AspNet.PlatformHandler": "1.0.0-*", + "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*", From ca6d7ffdd3761e6848fb591f72bfe846cc6248b2 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 28 Sep 2015 16:07:36 -0700 Subject: [PATCH 046/291] Add HttpPlatformHandler for windows auth tests. --- test/ServerComparison.FunctionalTests/NtlmAuthentation.config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentation.config b/test/ServerComparison.FunctionalTests/NtlmAuthentation.config index b639cc4091..f821bafb01 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentation.config +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentation.config @@ -118,6 +118,7 @@
+
@@ -252,6 +253,7 @@ + @@ -926,6 +928,7 @@ + From 452675918d427eb704eefe07b020bd32a913ba52 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 28 Sep 2015 23:15:34 -0700 Subject: [PATCH 047/291] Updating to release NuGet.config. --- NuGet.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 52bf414192..71b9724a09 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + From b33cb285fba43e3de26c8bffbc478aa10a9d80df Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 30 Sep 2015 11:00:08 -0700 Subject: [PATCH 048/291] Disable broken IIS tests. Standardize commands. --- .../ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- .../NtlmAuthentationTest.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 10 +++++----- test/ServerComparison.TestSites/project.json | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 8593aed187..0542b5ae48 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -66,7 +66,7 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, - Command = serverType == ServerType.WebListener ? "web" : "kestrel", + Command = serverType == ServerType.WebListener ? "weblistener" : "web", EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 44327bf96f..64ea17eeaf 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -35,7 +35,7 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, - Command = serverType == ServerType.WebListener ? "web" : "kestrel", + Command = serverType == ServerType.WebListener ? "weblistener" : "web", EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 29a95bb9e8..06aab09552 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -37,7 +37,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -53,7 +53,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -69,7 +69,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -85,7 +85,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5077/")] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -111,7 +111,7 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", - Command = serverType == ServerType.WebListener ? "web" : "kestrel", + Command = serverType == ServerType.WebListener ? "weblistener" : "web", ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config }; diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index bfe3a08bb3..4a87ba6a97 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -13,8 +13,8 @@ }, "commands": { - "web": "Microsoft.AspNet.Server.WebListener", - "kestrel": "Microsoft.AspNet.Server.Kestrel" + "weblistener": "Microsoft.AspNet.Server.WebListener", + "web": "Microsoft.AspNet.Server.Kestrel" }, "frameworks": { From e7a6a3d6fd7de3a0af9ee133ac9efc9b954af2de Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 1 Oct 2015 11:58:20 -0700 Subject: [PATCH 049/291] Update 'build.cmd' alias parameter to use full name. --- build.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.cmd b/build.cmd index 422bf80656..6b29ca5f7d 100644 --- a/build.cmd +++ b/build.cmd @@ -30,7 +30,7 @@ IF "%SKIP_DNX_INSTALL%"=="1" goto run IF %BUILDCMD_DNX_VERSION%=="" ( CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86 ) ELSE ( - CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default + CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -alias default ) CALL packages\KoreBuild\build\dnvm install default -arch x64 CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86 From 6db42469e70a71b5f15458c9f57e108705a54cca Mon Sep 17 00:00:00 2001 From: Pranav K Date: Sat, 3 Oct 2015 15:44:46 -0700 Subject: [PATCH 050/291] Renaming Microsoft.Framework.* -> Microsoft.Extensions.* --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- .../NtlmAuthentationTest.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- test/ServerComparison.FunctionalTests/project.json | 2 +- test/ServerComparison.TestSites/StartupHelloWorld.cs | 2 +- .../ServerComparison.TestSites/StartupNtlmAuthentication.cs | 2 +- test/ServerComparison.TestSites/StartupResponses.cs | 4 ++-- test/ServerComparison.TestSites/project.json | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 0542b5ae48..35e84bc492 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -7,7 +7,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNet.Server.Testing; using Microsoft.AspNet.Testing.xunit; -using Microsoft.Framework.Logging; +using Microsoft.Extensions.Logging; using Xunit; using Xunit.Sdk; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 64ea17eeaf..14a0364d51 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -8,7 +8,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNet.Server.Testing; using Microsoft.AspNet.Testing.xunit; -using Microsoft.Framework.Logging; +using Microsoft.Extensions.Logging; using Xunit; using Xunit.Sdk; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 06aab09552..3718e65bf7 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -9,7 +9,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNet.Server.Testing; using Microsoft.AspNet.Testing.xunit; -using Microsoft.Framework.Logging; +using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; using Xunit.Sdk; diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index a217f8722e..e8bf5fd0e7 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -8,7 +8,7 @@ "dependencies": { "Microsoft.AspNet.Server.IIS": "1.0.0-*", "Microsoft.AspNet.Server.Testing": "1.0.0-*", - "Microsoft.Framework.Logging.Console": "1.0.0-*", + "Microsoft.Extensions.Logging.Console": "1.0.0-*", "xunit.runner.aspnet": "2.0.0-aspnet-*" }, "frameworks": { diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index 85e7b693ef..c1d079342b 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -3,7 +3,7 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; -using Microsoft.Framework.Logging; +using Microsoft.Extensions.Logging; namespace ServerComparison.TestSites { diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index fb8f64e6c8..2211c55ed6 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -4,7 +4,7 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Features; -using Microsoft.Framework.Logging; +using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites diff --git a/test/ServerComparison.TestSites/StartupResponses.cs b/test/ServerComparison.TestSites/StartupResponses.cs index a71c3968f6..53e11362b4 100644 --- a/test/ServerComparison.TestSites/StartupResponses.cs +++ b/test/ServerComparison.TestSites/StartupResponses.cs @@ -1,9 +1,9 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; -using Microsoft.Framework.Logging; +using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; namespace ServerComparison.TestSites diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 4a87ba6a97..571afc71f6 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,4 +1,4 @@ -{ +{ "webroot": "wwwroot", "version": "1.0.0-*", @@ -7,8 +7,8 @@ "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*", - "Microsoft.Framework.Configuration.Json": "1.0.0-*", - "Microsoft.Framework.Logging.Console": "1.0.0-*", + "Microsoft.Extensions.Configuration.Json": "1.0.0-*", + "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, From 951b565542eb60e23b1f25919c904d3690cdf2eb Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Sun, 11 Oct 2015 00:44:12 -0700 Subject: [PATCH 051/291] React to aspnet/Universe#290 fix - pick up latest `build.cmd` and `build.sh` files - preserve installation of x64 DNX packages in this repo --- build.cmd | 29 +++++++++++++++-------------- build.sh | 12 +++++++----- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/build.cmd b/build.cmd index 6b29ca5f7d..904eb2d83a 100644 --- a/build.cmd +++ b/build.cmd @@ -18,24 +18,25 @@ md .nuget copy %CACHED_NUGET% .nuget\nuget.exe > nul :restore -IF EXIST packages\KoreBuild goto run +IF EXIST packages\Sake goto getdnx IF %BUILDCMD_KOREBUILD_VERSION%=="" ( - .nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre + .nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre ) ELSE ( - .nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre + .nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre ) -.nuget\nuget.exe install Sake -ExcludeVersion -Out packages +.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages -IF "%SKIP_DNX_INSTALL%"=="1" goto run -IF %BUILDCMD_DNX_VERSION%=="" ( - CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86 +:getdnx +IF "%SKIP_DNX_INSTALL%"=="" ( + IF "%BUILDCMD_DNX_VERSION%"=="" ( + BUILDCMD_DNX_VERSION=latest + ) + CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default + CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64 + CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x64 + CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default ) ELSE ( - CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -alias default + CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86 ) -CALL packages\KoreBuild\build\dnvm install default -arch x64 -CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86 -CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64 -:run -CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86 -packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %* \ No newline at end of file +packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %* diff --git a/build.sh b/build.sh index 0c66139817..da4e3fcd1c 100755 --- a/build.sh +++ b/build.sh @@ -24,18 +24,20 @@ if test ! -e .nuget; then cp $cachePath .nuget/nuget.exe fi -if test ! -d packages/KoreBuild; then +if test ! -d packages/Sake; then mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre - mono .nuget/nuget.exe install Sake -ExcludeVersion -Out packages + mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages fi if ! type dnvm > /dev/null 2>&1; then source packages/KoreBuild/build/dnvm.sh fi -if ! type dnx > /dev/null 2>&1; then - dnvm upgrade +if ! type dnx > /dev/null 2>&1 || [ -z "$SKIP_DNX_INSTALL" ]; then + dnvm install latest -runtime coreclr -alias default + dnvm install default -runtime mono -alias default +else + dnvm use default -runtime mono fi mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@" - From e509e6849fc3ab03e7bc9d6bbb4ffc8409205871 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Mon, 12 Oct 2015 13:18:43 -0700 Subject: [PATCH 052/291] Fix local build break --- build.cmd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.cmd b/build.cmd index 904eb2d83a..b51b267e5a 100644 --- a/build.cmd +++ b/build.cmd @@ -4,8 +4,8 @@ cd %~dp0 SETLOCAL SET NUGET_VERSION=latest SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe -SET BUILDCMD_KOREBUILD_VERSION="" -SET BUILDCMD_DNX_VERSION="" +SET BUILDCMD_KOREBUILD_VERSION= +SET BUILDCMD_DNX_VERSION= IF EXIST %CACHED_NUGET% goto copynuget echo Downloading latest version of NuGet.exe... @@ -19,7 +19,7 @@ copy %CACHED_NUGET% .nuget\nuget.exe > nul :restore IF EXIST packages\Sake goto getdnx -IF %BUILDCMD_KOREBUILD_VERSION%=="" ( +IF "%BUILDCMD_KOREBUILD_VERSION%"=="" ( .nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre ) ELSE ( .nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre @@ -27,10 +27,10 @@ IF %BUILDCMD_KOREBUILD_VERSION%=="" ( .nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages :getdnx +IF "%BUILDCMD_DNX_VERSION%"=="" ( + SET BUILDCMD_DNX_VERSION=latest +) IF "%SKIP_DNX_INSTALL%"=="" ( - IF "%BUILDCMD_DNX_VERSION%"=="" ( - BUILDCMD_DNX_VERSION=latest - ) CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64 CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x64 From 7e9fab33b39eeca9b50d263da22cf398f0704952 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Tue, 13 Oct 2015 05:07:02 -0700 Subject: [PATCH 053/291] Reacting to testing changes --- .../HelloWorldTest.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 35e84bc492..37916008fb 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -17,28 +17,31 @@ namespace ServerComparison.FunctionalTests public class HelloWorldTests { [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/")] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/")] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5067/")] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CLR)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5067/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x64, "http://localhost:5068/")] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5068/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x64, "http://localhost:5069/")] public Task HelloWorld_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); @@ -46,7 +49,8 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [SkipIfIISVariationsNotEnabled] - [OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [SkipIfCurrentRuntimeIsCoreClr] [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5069/")] [InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/")] From ca2c7f7aaa7911141d49242a2bf21dd54552bdc7 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 14 Oct 2015 12:10:42 -0700 Subject: [PATCH 054/291] Reacting to testing changes --- .../NtlmAuthentationTest.cs | 3 +- .../ResponseTests.cs | 43 +++++++++++-------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 14a0364d51..21a4a89806 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -18,7 +18,8 @@ namespace ServerComparison.FunctionalTests public class NtlmAuthenticationTests { [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] // TODO: https://github.com/aspnet/IISIntegration/issues/1 // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 3718e65bf7..37638a2860 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -20,7 +20,8 @@ namespace ServerComparison.FunctionalTests public class ResponseTests { [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) @@ -29,71 +30,75 @@ namespace ServerComparison.FunctionalTests } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5074/")] public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5075/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5076/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5077/")] public Task ResponseFormats_Kestrel_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5079/")] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5080/")] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5082/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/")] public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5077/")] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5084/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5085/")] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5078/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5086/")] public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); @@ -127,7 +132,7 @@ namespace ServerComparison.FunctionalTests { return httpClient.GetAsync(string.Empty); }, logger, deploymentResult.HostShutdownToken); - + var responseText = await response.Content.ReadAsStringAsync(); try { From 661477a4bfe067cf3d750623cd4286126582e10d Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 14 Oct 2015 13:13:18 -0700 Subject: [PATCH 055/291] Fixed tests --- .../HelloWorldTest.cs | 1 - test/ServerComparison.TestSites/project.json | 63 ++++++++++--------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 37916008fb..3644ad2fb8 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -40,7 +40,6 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5068/")] [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x64, "http://localhost:5069/")] public Task HelloWorld_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 571afc71f6..b8b20a984c 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,37 +1,38 @@ { - "webroot": "wwwroot", - "version": "1.0.0-*", + "webroot": "wwwroot", + "version": "1.0.0-*", - "dependencies": { - "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Server.WebListener": "1.0.0-*", - "Microsoft.AspNet.WebUtilities": "1.0.0-*", - "Microsoft.Extensions.Configuration.Json": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.0.0-*" - }, + "dependencies": { + "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", + "Microsoft.AspNet.Server.WebListener": "1.0.0-*", + "Microsoft.AspNet.WebUtilities": "1.0.0-*", + "Microsoft.Extensions.Configuration.Json": "1.0.0-*", + "Microsoft.Extensions.Logging.Console": "1.0.0-*", + "Microsoft.Net.Http.Headers": "1.0.0-*" + }, - "commands": { - "weblistener": "Microsoft.AspNet.Server.WebListener", - "web": "Microsoft.AspNet.Server.Kestrel" - }, + "commands": { + "kestrel": "Microsoft.AspNet.Server.Kestrel", + "web": "Microsoft.AspNet.Server.Kestrel", + "weblistener": "Microsoft.AspNet.Server.WebListener" + }, - "frameworks": { - "dnx451": { }, - "dnxcore50": { } - }, + "frameworks": { + "dnx451": { }, + "dnxcore50": { } + }, - "publishExclude": [ - "node_modules", - "bower_components", - "**.xproj", - "**.user", - "**.vspscc" - ], - "exclude": [ - "wwwroot", - "node_modules", - "bower_components" - ] + "publishExclude": [ + "node_modules", + "bower_components", + "**.xproj", + "**.user", + "**.vspscc" + ], + "exclude": [ + "wwwroot", + "node_modules", + "bower_components" + ] } From 08d17b26317105f5b0685d65f2aaeed6c46fe6cd Mon Sep 17 00:00:00 2001 From: Chris R Date: Thu, 15 Oct 2015 13:47:22 -0700 Subject: [PATCH 056/291] React to Authentication changes. --- .../NtlmAuthentationTest.cs | 19 +++++++++++--- .../ResponseTests.cs | 8 +++--- .../StartupNtlmAuthentication.cs | 25 ++++++++++++++++++- 3 files changed, 43 insertions(+), 9 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 21a4a89806..9c4d8510df 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -59,15 +59,18 @@ namespace ServerComparison.FunctionalTests { Assert.Equal("Hello World", responseText); - responseText = await httpClient.GetStringAsync("/Anonymous"); + response = await httpClient.GetAsync("/Anonymous"); + responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Anonymous?True", responseText); response = await httpClient.GetAsync("/Restricted"); + responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); response = await httpClient.GetAsync("/RestrictedNTLM"); + responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); // Note IIS can't restrict a challenge to a specific auth type, the native auth modules always add themselves. @@ -88,22 +91,30 @@ namespace ServerComparison.FunctionalTests httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; response = await httpClient.GetAsync("/AutoForbid"); + responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); - responseText = await httpClient.GetStringAsync("/Restricted"); + response = await httpClient.GetAsync("/Restricted"); + responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal("Negotiate", responseText); - responseText = await httpClient.GetStringAsync("/RestrictedNegotiate"); + response = await httpClient.GetAsync("/RestrictedNegotiate"); + responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal("Negotiate", responseText); if (serverType == ServerType.WebListener) { - responseText = await httpClient.GetStringAsync("/RestrictedNTLM"); + response = await httpClient.GetAsync("/RestrictedNTLM"); + responseText = await response.Content.ReadAsStringAsync(); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal("NTLM", responseText); } else if (serverType == ServerType.IISExpress) { response = await httpClient.GetAsync("/RestrictedNTLM"); + responseText = await response.Content.ReadAsStringAsync(); // This isn't a Forbidden because we authenticate with Negotiate and challenge for NTLM. Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); // Note IIS can't restrict a challenge to a specific auth type, the native auth modules always add themselves, diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 37638a2860..6791ddca0e 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -39,7 +39,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5075/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5075/")] // https://github.com/aspnet/IISIntegration/issues/7 [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5076/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -56,7 +56,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] // https://github.com/aspnet/IISIntegration/issues/7 [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5079/")] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -73,7 +73,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/")] // https://github.com/aspnet/IISIntegration/issues/7 [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5082/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -90,7 +90,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5084/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5084/")] // https://github.com/aspnet/IISIntegration/issues/7 [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5085/")] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 2211c55ed6..d14cbb774c 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Features; @@ -28,6 +29,24 @@ namespace ServerComparison.TestSites { loggerFactory.AddConsole(minLevel: LogLevel.Warning); + app.Use(async (context, next) => + { + try + { + await next(); + } + catch (Exception ex) + { + if (context.Response.HasStarted) + { + throw; + } + context.Response.Clear(); + context.Response.StatusCode = 500; + await context.Response.WriteAsync(ex.ToString()); + } + }); + // Set up NTLM authentication for WebListener like below. // For IIS and IISExpress: Use inetmgr to setup NTLM authentication on the application vDir or modify the applicationHost.config to enable NTLM. var listener = app.ServerFeatures.Get(); @@ -36,6 +55,10 @@ namespace ServerComparison.TestSites listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; } + else + { + app.UseIISPlatformHandler(); + } app.Use((context, next) => { @@ -58,7 +81,7 @@ namespace ServerComparison.TestSites if (context.Request.Path.Equals("/Forbidden")) { - return context.Authentication.ForbidAsync(string.Empty); + return context.Authentication.ForbidAsync(Microsoft.AspNet.Http.Authentication.AuthenticationManager.AutomaticScheme); } if (context.Request.Path.Equals("/AutoForbid")) From 4381e5e7c9f0b576ee308a98d8403eb9a40f42f2 Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 28 Oct 2015 09:51:23 -0700 Subject: [PATCH 057/291] Add missing wwwroot dir in the test app. --- test/ServerComparison.TestSites/wwwroot/web.config | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/ServerComparison.TestSites/wwwroot/web.config diff --git a/test/ServerComparison.TestSites/wwwroot/web.config b/test/ServerComparison.TestSites/wwwroot/web.config new file mode 100644 index 0000000000..808996e582 --- /dev/null +++ b/test/ServerComparison.TestSites/wwwroot/web.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From f80042e902a98afbef51efbc5aba80f4e6f48513 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 28 Oct 2015 12:43:07 -0700 Subject: [PATCH 058/291] Updating to release NuGet.config. --- NuGet.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 52bf414192..71b9724a09 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + From 7a30e130043dc07a377af1a68669aca77fe7b6dd Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 25 Nov 2015 17:13:29 -0800 Subject: [PATCH 059/291] Removing redundant src placeholder --- src/Placeholder/project.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 src/Placeholder/project.json diff --git a/src/Placeholder/project.json b/src/Placeholder/project.json deleted file mode 100644 index 2e3b9ded68..0000000000 --- a/src/Placeholder/project.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "frameworks": { - "dnx451": {} - } -} From 125f1553b81277c2c3c0ceabb1e05e87fcedef54 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 11 Dec 2015 12:23:36 -0800 Subject: [PATCH 060/291] Updating to release NuGet.config. --- NuGet.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 52bf414192..71b9724a09 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + From 73fb78c47d7043fa3ef7ce2a599ff5c72379258b Mon Sep 17 00:00:00 2001 From: John Luo Date: Mon, 21 Dec 2015 14:40:36 -0800 Subject: [PATCH 061/291] Functional test update after Hosting API change --- .../HelloWorldTest.cs | 2 +- .../NtlmAuthentationTest.cs | 2 +- .../ResponseTests.cs | 2 +- test/ServerComparison.TestSites/Program.cs | 20 ++++++ .../Properties/launchSettings.json | 16 ++++- test/ServerComparison.TestSites/hosting.json | 3 + test/ServerComparison.TestSites/project.json | 65 ++++++++++--------- 7 files changed, 74 insertions(+), 36 deletions(-) create mode 100644 test/ServerComparison.TestSites/Program.cs create mode 100644 test/ServerComparison.TestSites/hosting.json diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 3644ad2fb8..aacc39dbdb 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -69,7 +69,7 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, - Command = serverType == ServerType.WebListener ? "weblistener" : "web", + Command = "web", EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 9c4d8510df..564c686ba2 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -36,7 +36,7 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, - Command = serverType == ServerType.WebListener ? "weblistener" : "web", + Command = "web", EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 6791ddca0e..25291d8d09 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -116,7 +116,7 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", - Command = serverType == ServerType.WebListener ? "weblistener" : "web", + Command = "web", ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config }; diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs new file mode 100644 index 0000000000..81a1777506 --- /dev/null +++ b/test/ServerComparison.TestSites/Program.cs @@ -0,0 +1,20 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNet.Hosting; + +namespace ServerComparison.TestSites +{ + public static class Program + { + public static void Main(string[] args) + { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup("ServerComparison.TestSites") + .Build(); + + application.Run(); + } + } +} diff --git a/test/ServerComparison.TestSites/Properties/launchSettings.json b/test/ServerComparison.TestSites/Properties/launchSettings.json index b111483280..7e255d2086 100644 --- a/test/ServerComparison.TestSites/Properties/launchSettings.json +++ b/test/ServerComparison.TestSites/Properties/launchSettings.json @@ -1,10 +1,24 @@ { + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:39982/", + "sslPort": 0 + } + }, "profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "environmentVariables": { - "ASPNET_ENV": "HelloWorld" + "ASPNET_ENVIRONMENT": "HelloWorld" + } + }, + "web": { + "commandName": "web", + "environmentVariables": { + "ASPNET_ENVIRONMENT": "HelloWorld" } } } diff --git a/test/ServerComparison.TestSites/hosting.json b/test/ServerComparison.TestSites/hosting.json new file mode 100644 index 0000000000..f8ef14574d --- /dev/null +++ b/test/ServerComparison.TestSites/hosting.json @@ -0,0 +1,3 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel" +} diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index b8b20a984c..47c044c6b7 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,38 +1,39 @@ { - "webroot": "wwwroot", - "version": "1.0.0-*", + "version": "1.0.0-*", - "dependencies": { - "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Server.WebListener": "1.0.0-*", - "Microsoft.AspNet.WebUtilities": "1.0.0-*", - "Microsoft.Extensions.Configuration.Json": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.0.0-*" - }, + "dependencies": { + "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", + "Microsoft.AspNet.Server.WebListener": "1.0.0-*", + "Microsoft.AspNet.WebUtilities": "1.0.0-*", + "Microsoft.Extensions.Configuration.Json": "1.0.0-*", + "Microsoft.Extensions.Logging.Console": "1.0.0-*", + "Microsoft.Net.Http.Headers": "1.0.0-*" + }, - "commands": { - "kestrel": "Microsoft.AspNet.Server.Kestrel", - "web": "Microsoft.AspNet.Server.Kestrel", - "weblistener": "Microsoft.AspNet.Server.WebListener" - }, + "commands": { + "web": "ServerComparison.TestSites" + }, - "frameworks": { - "dnx451": { }, - "dnxcore50": { } - }, + "compilationOptions": { + "emitEntryPoint": true + }, - "publishExclude": [ - "node_modules", - "bower_components", - "**.xproj", - "**.user", - "**.vspscc" - ], - "exclude": [ - "wwwroot", - "node_modules", - "bower_components" - ] + "frameworks": { + "dnx451": { }, + "dnxcore50": { } + }, + + "publishExclude": [ + "node_modules", + "bower_components", + "**.xproj", + "**.user", + "**.vspscc" + ], + "exclude": [ + "wwwroot", + "node_modules", + "bower_components" + ] } From 77ca6be6cb216b815f3c320b91f125edc8565d8f Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 12 Jan 2016 14:17:31 -0800 Subject: [PATCH 062/291] React to hosting platform handler API changes. --- test/ServerComparison.TestSites/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index 81a1777506..e1370aa76e 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -11,6 +11,7 @@ namespace ServerComparison.TestSites { var application = new WebApplicationBuilder() .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseIISPlatformHandlerUrl() .UseStartup("ServerComparison.TestSites") .Build(); From 5135a8938e185121e8fd00d623d52c15388e708c Mon Sep 17 00:00:00 2001 From: John Luo Date: Sun, 17 Jan 2016 16:43:28 -0800 Subject: [PATCH 063/291] Reacting to hosting rename --- .gitignore | 3 ++- test/ServerComparison.TestSites/Program.cs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index be311a1f7d..8ce7844e6c 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,5 @@ nuget.exe *.ncrunchsolution *.*sdf *.ipch -project.lock.json \ No newline at end of file +project.lock.json +/.vs/ diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index e1370aa76e..f211f127d7 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -9,13 +9,13 @@ namespace ServerComparison.TestSites { public static void Main(string[] args) { - var application = new WebApplicationBuilder() - .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + var host = new WebHostBuilder() + .UseDefaultConfiguration(args) .UseIISPlatformHandlerUrl() .UseStartup("ServerComparison.TestSites") .Build(); - application.Run(); + host.Run(); } } } From d631e8edd077df3c64cb4e4b11bce400b0b9fc9c Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Fri, 22 Jan 2016 12:24:01 -0800 Subject: [PATCH 064/291] Rename AspNet 5 file contents. See https://github.com/aspnet/Announcements/issues/144 for more information. --- .../HelloWorldTest.cs | 4 ++-- .../NtlmAuthentationTest.cs | 4 ++-- .../ResponseTests.cs | 4 ++-- test/ServerComparison.FunctionalTests/project.json | 4 ++-- test/ServerComparison.TestSites/Program.cs | 4 ++-- test/ServerComparison.TestSites/StartupHelloWorld.cs | 8 ++++---- .../StartupNtlmAuthentication.cs | 12 ++++++------ test/ServerComparison.TestSites/StartupResponses.cs | 4 ++-- test/ServerComparison.TestSites/hosting.json | 4 ++-- test/ServerComparison.TestSites/project.json | 8 ++++---- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index aacc39dbdb..2c39e051df 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -5,8 +5,8 @@ using System; using System.IO; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.AspNet.Server.Testing; -using Microsoft.AspNet.Testing.xunit; +using Microsoft.AspNetCore.Server.Testing; +using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; using Xunit; using Xunit.Sdk; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 564c686ba2..26c2d2d97a 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -6,8 +6,8 @@ using System.IO; using System.Net; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.AspNet.Server.Testing; -using Microsoft.AspNet.Testing.xunit; +using Microsoft.AspNetCore.Server.Testing; +using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; using Xunit; using Xunit.Sdk; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 25291d8d09..b02eebffba 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -7,8 +7,8 @@ using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.AspNet.Server.Testing; -using Microsoft.AspNet.Testing.xunit; +using Microsoft.AspNetCore.Server.Testing; +using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index e8bf5fd0e7..d202cd9f89 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -6,8 +6,8 @@ "test": "xunit.runner.aspnet" }, "dependencies": { - "Microsoft.AspNet.Server.IIS": "1.0.0-*", - "Microsoft.AspNet.Server.Testing": "1.0.0-*", + "Microsoft.AspNetCore.Server.IIS": "1.0.0-*", + "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "xunit.runner.aspnet": "2.0.0-aspnet-*" }, diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index f211f127d7..5adfff0d9c 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -1,7 +1,7 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNet.Hosting; +using Microsoft.AspNetCore.Hosting; namespace ServerComparison.TestSites { diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index c1d079342b..b2d386bf3b 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -1,15 +1,15 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Http; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; namespace ServerComparison.TestSites { /// /// To make runtime to load an environment based startup class, specify the environment by the following ways: - /// 1. Drop a Microsoft.AspNet.Hosting.ini file in the wwwroot folder + /// 1. Drop a Microsoft.AspNetCore.Hosting.ini file in the wwwroot folder /// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named /// 'StartupHelloWorld' the value of the env should be 'HelloWorld' (eg. ASPNET_ENV=HelloWorld). Runtime adds a 'Startup' prefix to this and loads 'StartupHelloWorld'. /// If no environment name is specified the default startup class loaded is 'Startup'. @@ -17,7 +17,7 @@ namespace ServerComparison.TestSites /// 1. Set the environment variable named SET ASPNET_ENV=HelloWorld /// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg: /// "commands": { - /// "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV HelloWorld", + /// "web": "Microsoft.AspNetCore.Hosting --server Microsoft.AspNetCore.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV HelloWorld", /// }, /// public class StartupHelloWorld diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index d14cbb774c..ed365f47d1 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -2,9 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Http; -using Microsoft.AspNet.Http.Features; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Server; @@ -12,7 +12,7 @@ namespace ServerComparison.TestSites { /// /// To make runtime to load an environment based startup class, specify the environment by the following ways: - /// 1. Drop a Microsoft.AspNet.Hosting.ini file in the wwwroot folder + /// 1. Drop a Microsoft.AspNetCore.Hosting.ini file in the wwwroot folder /// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named /// 'StartupNtlmAuthentication' the value of the env should be 'NtlmAuthentication' (eg. ASPNET_ENV=NtlmAuthentication). Runtime adds a 'Startup' prefix to this and loads 'StartupNtlmAuthentication'. /// If no environment name is specified the default startup class loaded is 'Startup'. @@ -20,7 +20,7 @@ namespace ServerComparison.TestSites /// 1. Set the environment variable named SET ASPNET_ENV=NtlmAuthentication /// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg: /// "commands": { - /// "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV NtlmAuthentication", + /// "web": "Microsoft.AspNetCore.Hosting --server Microsoft.AspNetCore.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV NtlmAuthentication", /// }, /// public class StartupNtlmAuthentication @@ -81,7 +81,7 @@ namespace ServerComparison.TestSites if (context.Request.Path.Equals("/Forbidden")) { - return context.Authentication.ForbidAsync(Microsoft.AspNet.Http.Authentication.AuthenticationManager.AutomaticScheme); + return context.Authentication.ForbidAsync(Microsoft.AspNetCore.Http.Authentication.AuthenticationManager.AutomaticScheme); } if (context.Request.Path.Equals("/AutoForbid")) diff --git a/test/ServerComparison.TestSites/StartupResponses.cs b/test/ServerComparison.TestSites/StartupResponses.cs index 53e11362b4..ebce640b37 100644 --- a/test/ServerComparison.TestSites/StartupResponses.cs +++ b/test/ServerComparison.TestSites/StartupResponses.cs @@ -1,8 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Http; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/test/ServerComparison.TestSites/hosting.json b/test/ServerComparison.TestSites/hosting.json index f8ef14574d..6a93dbafa8 100644 --- a/test/ServerComparison.TestSites/hosting.json +++ b/test/ServerComparison.TestSites/hosting.json @@ -1,3 +1,3 @@ -{ - "server": "Microsoft.AspNet.Server.Kestrel" +{ + "server": "Microsoft.AspNetCore.Server.Kestrel" } diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 47c044c6b7..02899f85ee 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -2,10 +2,10 @@ "version": "1.0.0-*", "dependencies": { - "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Server.WebListener": "1.0.0-*", - "Microsoft.AspNet.WebUtilities": "1.0.0-*", + "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", + "Microsoft.AspNetCore.Server.WebListener": "1.0.0-*", + "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" From 5b27b3f972b68cff90d180ca956a768aa4210db5 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Fri, 22 Jan 2016 12:28:31 -0800 Subject: [PATCH 065/291] Update ASP.NET 5 versions for ASP.NET Core. See https://github.com/aspnet/Announcements/issues/144 for more information. --- test/ServerComparison.TestSites/project.json | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 02899f85ee..843f02f5a6 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,29 +1,24 @@ { "version": "1.0.0-*", - "dependencies": { "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNetCore.Server.WebListener": "1.0.0-*", + "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*", "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, - "commands": { "web": "ServerComparison.TestSites" }, - "compilationOptions": { "emitEntryPoint": true }, - "frameworks": { - "dnx451": { }, - "dnxcore50": { } + "dnx451": {}, + "dnxcore50": {} }, - "publishExclude": [ "node_modules", "bower_components", @@ -36,4 +31,4 @@ "node_modules", "bower_components" ] -} +} \ No newline at end of file From a905276f4b4c124bdacb5fab17c99d1d63c0114e Mon Sep 17 00:00:00 2001 From: Brennan Date: Fri, 22 Jan 2016 15:58:22 -0800 Subject: [PATCH 066/291] Remove old IIS --- test/ServerComparison.FunctionalTests/project.json | 1 - 1 file changed, 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index d202cd9f89..4d361e92e4 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -6,7 +6,6 @@ "test": "xunit.runner.aspnet" }, "dependencies": { - "Microsoft.AspNetCore.Server.IIS": "1.0.0-*", "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "xunit.runner.aspnet": "2.0.0-aspnet-*" From 1db5233caca6e74c1ed98f4e8006f46fab76d784 Mon Sep 17 00:00:00 2001 From: Brennan Date: Fri, 22 Jan 2016 16:07:05 -0800 Subject: [PATCH 067/291] Add missing packages --- .../project.json | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 4d361e92e4..249ba913e0 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -1,22 +1,23 @@ { - "compilationOptions": { - "warningsAsErrors": true - }, - "commands": { - "test": "xunit.runner.aspnet" - }, - "dependencies": { - "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "xunit.runner.aspnet": "2.0.0-aspnet-*" - }, - "frameworks": { - "dnx451": { - "frameworkAssemblies": { - "System.Data": "", - "System.Net.Http": "", - "System.Xml": "" - } - } + "compilationOptions": { + "warningsAsErrors": true + }, + "commands": { + "test": "xunit.runner.aspnet" + }, + "dependencies": { + "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", + "Microsoft.Extensions.Logging.Console": "1.0.0-*", + "Microsoft.Net.Http.Headers": "1.0.0-*", + "xunit.runner.aspnet": "2.0.0-aspnet-*" + }, + "frameworks": { + "dnx451": { + "frameworkAssemblies": { + "System.Data": "", + "System.Net.Http": "", + "System.Xml": "" + } } + } } \ No newline at end of file From c5186cc01da6ae16837b873ea4206898e602ee56 Mon Sep 17 00:00:00 2001 From: Cesar Blum Silveira Date: Wed, 3 Feb 2016 11:52:24 -0800 Subject: [PATCH 068/291] Reference Microsoft.NETCore.Platforms where necessary. --- test/ServerComparison.FunctionalTests/project.json | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 249ba913e0..a0b3d75a94 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -9,6 +9,7 @@ "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*", + "Microsoft.NETCore.Platforms": "1.0.1-*", "xunit.runner.aspnet": "2.0.0-aspnet-*" }, "frameworks": { From df548e1d046ac1859b70bfe07f1d44a1b3f269c4 Mon Sep 17 00:00:00 2001 From: Victor Hurdugaci Date: Thu, 4 Feb 2016 16:34:00 -0800 Subject: [PATCH 069/291] Build with dotnet --- .gitattributes | 1 + .gitignore | 2 + build.cmd | 70 +++++++++---------- build.sh | 42 +++++------ .../HelloWorldTest.cs | 18 ++--- .../NtlmAuthentationTest.cs | 3 +- .../ResponseTests.cs | 27 ++++--- test/ServerComparison.TestSites/project.json | 28 +++----- .../wwwroot/web.config | 2 +- 9 files changed, 89 insertions(+), 104 deletions(-) diff --git a/.gitattributes b/.gitattributes index bdaa5ba982..97b827b758 100644 --- a/.gitattributes +++ b/.gitattributes @@ -48,3 +48,4 @@ *.fsproj text=auto *.dbproj text=auto *.sln text=auto eol=crlf +*.sh eol=lf diff --git a/.gitignore b/.gitignore index 8ce7844e6c..df62d36cd8 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ nuget.exe *.ipch project.lock.json /.vs/ +.testPublish/ +.build/ \ No newline at end of file diff --git a/build.cmd b/build.cmd index b51b267e5a..65fb3e3353 100644 --- a/build.cmd +++ b/build.cmd @@ -1,42 +1,40 @@ -@echo off -cd %~dp0 - +@ECHO off SETLOCAL + +SET REPO_FOLDER=%~dp0 +CD "%REPO_FOLDER%" + +SET BUILD_FOLDER=.build +SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet +SET KOREBUILD_VERSION= + +SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe SET NUGET_VERSION=latest SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe -SET BUILDCMD_KOREBUILD_VERSION= -SET BUILDCMD_DNX_VERSION= -IF EXIST %CACHED_NUGET% goto copynuget -echo Downloading latest version of NuGet.exe... -IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet -@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'" - -:copynuget -IF EXIST .nuget\nuget.exe goto restore -md .nuget -copy %CACHED_NUGET% .nuget\nuget.exe > nul - -:restore -IF EXIST packages\Sake goto getdnx -IF "%BUILDCMD_KOREBUILD_VERSION%"=="" ( - .nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre -) ELSE ( - .nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre -) -.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages - -:getdnx -IF "%BUILDCMD_DNX_VERSION%"=="" ( - SET BUILDCMD_DNX_VERSION=latest -) -IF "%SKIP_DNX_INSTALL%"=="" ( - CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default - CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64 - CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x64 - CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default -) ELSE ( - CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86 +IF NOT EXIST %BUILD_FOLDER% ( + md %BUILD_FOLDER% ) -packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %* +IF NOT EXIST %NUGET_PATH% ( + IF NOT EXIST %CACHED_NUGET% ( + echo Downloading latest version of NuGet.exe... + IF NOT EXIST %LocalAppData%\NuGet ( + md %LocalAppData%\NuGet + ) + @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'" + ) + + copy %CACHED_NUGET% %NUGET_PATH% > nul +) + +IF NOT EXIST %KOREBUILD_FOLDER% ( + SET KOREBUILD_DOWNLOAD_ARGS= + IF NOT "%KOREBUILD_VERSION%"=="" ( + SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION% + ) + + %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS% +) + +"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %* diff --git a/build.sh b/build.sh index da4e3fcd1c..263fb667a8 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +buildFolder=.build +koreBuildFolder=$buildFolder/KoreBuild-dotnet + +nugetPath=$buildFolder/nuget.exe + if test `uname` = Darwin; then cachedir=~/Library/Caches/KBuild else @@ -11,33 +16,30 @@ else fi mkdir -p $cachedir nugetVersion=latest -cachePath=$cachedir/nuget.$nugetVersion.exe +cacheNuget=$cachedir/nuget.$nugetVersion.exe -url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe +nugetUrl=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe -if test ! -f $cachePath; then - wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null +if test ! -d $buildFolder; then + mkdir $buildFolder fi -if test ! -e .nuget; then - mkdir .nuget - cp $cachePath .nuget/nuget.exe +if test ! -f $nugetPath; then + if test ! -f $cacheNuget; then + wget -O $cacheNuget $nugetUrl 2>/dev/null || curl -o $cacheNuget --location $nugetUrl /dev/null + fi + + cp $cacheNuget $nugetPath fi -if test ! -d packages/Sake; then - mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre - mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages +if test ! -d $koreBuildFolder; then + mono $nugetPath install KoreBuild-dotnet -ExcludeVersion -o $buildFolder -nocache -pre + chmod +x $koreBuildFolder/build/KoreBuild.sh fi -if ! type dnvm > /dev/null 2>&1; then - source packages/KoreBuild/build/dnvm.sh +makeFile=makefile.shade +if [ ! -e $makeFile ]; then + makeFile=$koreBuildFolder/build/makefile.shade fi -if ! type dnx > /dev/null 2>&1 || [ -z "$SKIP_DNX_INSTALL" ]; then - dnvm install latest -runtime coreclr -alias default - dnvm install default -runtime mono -alias default -else - dnvm use default -runtime mono -fi - -mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@" +./$koreBuildFolder/build/KoreBuild.sh -n $nugetPath -m $makeFile "$@" diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 2c39e051df..af1c83b51c 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -16,14 +16,15 @@ namespace ServerComparison.FunctionalTests // Uses ports ranging 5061 - 5069. public class HelloWorldTests { + // Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601 [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] + //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/")] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -38,21 +39,13 @@ namespace ServerComparison.FunctionalTests return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x64, "http://localhost:5069/")] - public Task HelloWorld_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) - { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); - } - [ConditionalTheory] [SkipIfIISVariationsNotEnabled] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [SkipIfCurrentRuntimeIsCoreClr] [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5069/")] - [InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/")] + //[InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/")] public Task HelloWorld_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); @@ -69,7 +62,6 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, - Command = "web", EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 26c2d2d97a..0cced5abd9 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -23,7 +23,7 @@ namespace ServerComparison.FunctionalTests // TODO: https://github.com/aspnet/IISIntegration/issues/1 // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] + // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -36,7 +36,6 @@ namespace ServerComparison.FunctionalTests var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, - Command = "web", EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index b02eebffba..aff7d855ff 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -23,7 +23,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5073/")] public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); @@ -40,7 +40,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5075/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5076/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); @@ -53,15 +53,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5079/")] - public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) - { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); - } + // [ConditionalTheory] + // [OSSkipCondition(OperatingSystems.Linux)] + // [OSSkipCondition(OperatingSystems.MacOSX)] + // // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] // https://github.com/aspnet/IISIntegration/issues/7 + // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5079/")] + // public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + // { + // return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + // } [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5080/")] @@ -74,7 +74,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5082/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5082/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); @@ -91,7 +91,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5084/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5085/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5085/")] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); @@ -116,7 +116,6 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", - Command = "web", ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config }; diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 843f02f5a6..ff4c0c144c 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -7,28 +7,20 @@ "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", + "Microsoft.NETCore.Platforms": "1.0.1-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, - "commands": { - "web": "ServerComparison.TestSites" - }, "compilationOptions": { "emitEntryPoint": true }, - "frameworks": { - "dnx451": {}, - "dnxcore50": {} - }, - "publishExclude": [ - "node_modules", - "bower_components", - "**.xproj", - "**.user", - "**.vspscc" + "content": [ + "wwwroot/**/*", + "hosting.json" ], - "exclude": [ - "wwwroot", - "node_modules", - "bower_components" - ] + "frameworks": { + "dnx451": { }, + "dnxcore50": { + "imports": "portable-net451+win8" + } + } } \ No newline at end of file diff --git a/test/ServerComparison.TestSites/wwwroot/web.config b/test/ServerComparison.TestSites/wwwroot/web.config index 808996e582..fe1beaa3f3 100644 --- a/test/ServerComparison.TestSites/wwwroot/web.config +++ b/test/ServerComparison.TestSites/wwwroot/web.config @@ -1,6 +1,6 @@ - + From 55a0202c597d0cd89cf837eb321ca29ad3d7a40d Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 17 Feb 2016 16:57:26 -0800 Subject: [PATCH 070/291] Update tfm to net451 and test with xunit runner --- test/ServerComparison.FunctionalTests/Helpers.cs | 2 +- test/ServerComparison.FunctionalTests/project.json | 11 ++++++----- test/ServerComparison.TestSites/Program.cs | 1 + test/ServerComparison.TestSites/hosting.json | 3 --- test/ServerComparison.TestSites/project.json | 3 +-- 5 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 test/ServerComparison.TestSites/hosting.json diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 07c493bd6a..073b74b19f 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -10,7 +10,7 @@ namespace ServerComparison.FunctionalTests { public static string GetApplicationPath() { - return Path.GetFullPath(Path.Combine("..", "ServerComparison.TestSites")); + return Path.GetFullPath(Path.Combine("..", "..", "..", "ServerComparison.TestSites")); } } } \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index a0b3d75a94..12e60d5da8 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -2,18 +2,19 @@ "compilationOptions": { "warningsAsErrors": true }, - "commands": { - "test": "xunit.runner.aspnet" - }, + "testRunner": "xunit", "dependencies": { "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", + "Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*", "Microsoft.NETCore.Platforms": "1.0.1-*", - "xunit.runner.aspnet": "2.0.0-aspnet-*" }, "frameworks": { - "dnx451": { + "net451": { + "dependencies": { + "xunit.runner.console": "2.1.0" + }, "frameworkAssemblies": { "System.Data": "", "System.Net.Http": "", diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index 5adfff0d9c..a8ed251a8d 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -13,6 +13,7 @@ namespace ServerComparison.TestSites .UseDefaultConfiguration(args) .UseIISPlatformHandlerUrl() .UseStartup("ServerComparison.TestSites") + .UseServer("Microsoft.AspNetCore.Server.Kestrel") .Build(); host.Run(); diff --git a/test/ServerComparison.TestSites/hosting.json b/test/ServerComparison.TestSites/hosting.json deleted file mode 100644 index 6a93dbafa8..0000000000 --- a/test/ServerComparison.TestSites/hosting.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "server": "Microsoft.AspNetCore.Server.Kestrel" -} diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index ff4c0c144c..3d4e43cad8 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -14,8 +14,7 @@ "emitEntryPoint": true }, "content": [ - "wwwroot/**/*", - "hosting.json" + "wwwroot/**/*" ], "frameworks": { "dnx451": { }, From ce425305bbae2f4147e04047ed86539447f7794a Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 19 Feb 2016 06:22:57 -0800 Subject: [PATCH 071/291] Fixing build break --- test/ServerComparison.FunctionalTests/project.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 12e60d5da8..636628dec5 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -7,8 +7,7 @@ "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", "Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.0.0-*", - "Microsoft.NETCore.Platforms": "1.0.1-*", + "Microsoft.Net.Http.Headers": "1.0.0-*" }, "frameworks": { "net451": { @@ -16,9 +15,7 @@ "xunit.runner.console": "2.1.0" }, "frameworkAssemblies": { - "System.Data": "", - "System.Net.Http": "", - "System.Xml": "" + "System.Runtime": "" } } } From 90087b0c39ad61990cacd52256a67e68d8b007fd Mon Sep 17 00:00:00 2001 From: moozzyk Date: Fri, 19 Feb 2016 14:24:10 -0800 Subject: [PATCH 072/291] Fixing failing tests --- test/ServerComparison.FunctionalTests/project.json | 6 ++++++ test/ServerComparison.TestSites/Program.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 636628dec5..644902033e 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -9,6 +9,12 @@ "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, + + "content": [ + "Http.config", + "NtlmAuthentation.config" + ], + "frameworks": { "net451": { "dependencies": { diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index a8ed251a8d..d63b989a19 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -10,10 +10,10 @@ namespace ServerComparison.TestSites public static void Main(string[] args) { var host = new WebHostBuilder() + .UseServer ("Microsoft.AspNetCore.Server.Kestrel") .UseDefaultConfiguration(args) .UseIISPlatformHandlerUrl() .UseStartup("ServerComparison.TestSites") - .UseServer("Microsoft.AspNetCore.Server.Kestrel") .Build(); host.Run(); From 4ad6bbcdd3b56d21ebe9a38a246dbad4ae18572d Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 23 Feb 2016 16:26:30 -0800 Subject: [PATCH 073/291] Add required dependency for running test site --- test/ServerComparison.TestSites/project.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 3d4e43cad8..f580d5692b 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -19,6 +19,9 @@ "frameworks": { "dnx451": { }, "dnxcore50": { + "dependencies": { + "NETStandard.Library": "1.0.0-*" + }, "imports": "portable-net451+win8" } } From d0caad8631edc3f7349abb8f0d06c122343433f5 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Wed, 24 Feb 2016 13:04:58 -0800 Subject: [PATCH 074/291] Update `build.cmd` to match latest template - aspnet/Universe#347 - `%KOREBUILD_VERSION%` doesn't work without this fix --- build.cmd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build.cmd b/build.cmd index 65fb3e3353..95b049cf63 100644 --- a/build.cmd +++ b/build.cmd @@ -28,12 +28,11 @@ IF NOT EXIST %NUGET_PATH% ( copy %CACHED_NUGET% %NUGET_PATH% > nul ) +SET KOREBUILD_DOWNLOAD_ARGS= +IF NOT "%KOREBUILD_VERSION%"=="" ( + SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION% +) IF NOT EXIST %KOREBUILD_FOLDER% ( - SET KOREBUILD_DOWNLOAD_ARGS= - IF NOT "%KOREBUILD_VERSION%"=="" ( - SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION% - ) - %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS% ) From 0f8f9a46b3539d6ee576f26cb874175b826e581c Mon Sep 17 00:00:00 2001 From: Victor Hurdugaci Date: Sat, 27 Feb 2016 12:51:13 -0800 Subject: [PATCH 075/291] Update the build scripts --- build.cmd | 41 ++----------------------------------- build.ps1 | 36 +++++++++++++++++++++++++++++++++ build.sh | 60 +++++++++++++++++++++++-------------------------------- 3 files changed, 63 insertions(+), 74 deletions(-) create mode 100644 build.ps1 diff --git a/build.cmd b/build.cmd index 95b049cf63..2fa024b15e 100644 --- a/build.cmd +++ b/build.cmd @@ -1,39 +1,2 @@ -@ECHO off -SETLOCAL - -SET REPO_FOLDER=%~dp0 -CD "%REPO_FOLDER%" - -SET BUILD_FOLDER=.build -SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet -SET KOREBUILD_VERSION= - -SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe -SET NUGET_VERSION=latest -SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe - -IF NOT EXIST %BUILD_FOLDER% ( - md %BUILD_FOLDER% -) - -IF NOT EXIST %NUGET_PATH% ( - IF NOT EXIST %CACHED_NUGET% ( - echo Downloading latest version of NuGet.exe... - IF NOT EXIST %LocalAppData%\NuGet ( - md %LocalAppData%\NuGet - ) - @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'" - ) - - copy %CACHED_NUGET% %NUGET_PATH% > nul -) - -SET KOREBUILD_DOWNLOAD_ARGS= -IF NOT "%KOREBUILD_VERSION%"=="" ( - SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION% -) -IF NOT EXIST %KOREBUILD_FOLDER% ( - %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS% -) - -"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %* +@ECHO OFF +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*" \ No newline at end of file diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000000..4fd24a30d5 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,36 @@ +cd $PSScriptRoot + +$repoFolder = $PSScriptRoot +$env:REPO_FOLDER = $repoFolder + +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +if ($env:KOREBUILD_ZIP) +{ + $koreBuildZip=$env:KOREBUILD_ZIP +} + +$buildFolder = ".build" +$buildFile="$buildFolder\KoreBuild.ps1" + +if (!(Test-Path $buildFolder)) { + Write-Host "Downloading KoreBuild from $koreBuildZip" + + $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid() + New-Item -Path "$tempFolder" -Type directory | Out-Null + + $localZipFile="$tempFolder\korebuild.zip" + + Invoke-WebRequest $koreBuildZip -OutFile $localZipFile + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) + + New-Item -Path "$buildFolder" -Type directory | Out-Null + copy-item "$tempFolder\**\build\*" $buildFolder -Recurse + + # Cleanup + if (Test-Path $tempFolder) { + Remove-Item -Recurse -Force $tempFolder + } +} + +&"$buildFile" $args \ No newline at end of file diff --git a/build.sh b/build.sh index 263fb667a8..79638d06b6 100755 --- a/build.sh +++ b/build.sh @@ -1,45 +1,35 @@ #!/usr/bin/env bash +repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $repoFolder -buildFolder=.build -koreBuildFolder=$buildFolder/KoreBuild-dotnet - -nugetPath=$buildFolder/nuget.exe - -if test `uname` = Darwin; then - cachedir=~/Library/Caches/KBuild -else - if [ -z $XDG_DATA_HOME ]; then - cachedir=$HOME/.local/share - else - cachedir=$XDG_DATA_HOME; - fi +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +if [ ! -z $KOREBUILD_ZIP ]; then + koreBuildZip=$KOREBUILD_ZIP fi -mkdir -p $cachedir -nugetVersion=latest -cacheNuget=$cachedir/nuget.$nugetVersion.exe -nugetUrl=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe +buildFolder=".build" +buildFile="$buildFolder/KoreBuild.sh" if test ! -d $buildFolder; then + echo "Downloading KoreBuild from $koreBuildZip" + + tempFolder="/tmp/KoreBuild-$(uuidgen)" + mkdir $tempFolder + + localZipFile="$tempFolder/korebuild.zip" + + wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip /dev/null + unzip -q -d $tempFolder $localZipFile + mkdir $buildFolder -fi - -if test ! -f $nugetPath; then - if test ! -f $cacheNuget; then - wget -O $cacheNuget $nugetUrl 2>/dev/null || curl -o $cacheNuget --location $nugetUrl /dev/null + cp -r $tempFolder/**/build/** $buildFolder + + chmod +x $buildFile + + # Cleanup + if test ! -d $tempFolder; then + rm -rf $tempFolder fi - - cp $cacheNuget $nugetPath fi -if test ! -d $koreBuildFolder; then - mono $nugetPath install KoreBuild-dotnet -ExcludeVersion -o $buildFolder -nocache -pre - chmod +x $koreBuildFolder/build/KoreBuild.sh -fi - -makeFile=makefile.shade -if [ ! -e $makeFile ]; then - makeFile=$koreBuildFolder/build/makefile.shade -fi - -./$koreBuildFolder/build/KoreBuild.sh -n $nugetPath -m $makeFile "$@" +$buildFile -r $repoFolder "$@" From bfc2ac4c14fa6725c877d856339dcfbe838399e7 Mon Sep 17 00:00:00 2001 From: Victor Hurdugaci Date: Sun, 28 Feb 2016 10:12:16 -0800 Subject: [PATCH 076/291] Return the error code from build.cmd --- build.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.cmd b/build.cmd index 2fa024b15e..7d4894cb4a 100644 --- a/build.cmd +++ b/build.cmd @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*" \ No newline at end of file +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" \ No newline at end of file From f6752030ddefb92b71eae3d56509aed592be805f Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Tue, 1 Mar 2016 13:36:17 -0800 Subject: [PATCH 077/291] Transition to netstandard. - dotnet5.X => netstandard1.y (where y = x-1). - DNXCore50 => netstandardapp1.5. - Applied the same changes to ifdefs. --- test/ServerComparison.TestSites/project.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index f580d5692b..0c2cfb387e 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -17,12 +17,15 @@ "wwwroot/**/*" ], "frameworks": { - "dnx451": { }, - "dnxcore50": { + "dnx451": {}, + "netstandardapp1.5": { "dependencies": { "NETStandard.Library": "1.0.0-*" }, - "imports": "portable-net451+win8" - } + "imports": [ + "dnxcore50", + "portable-net451+win8" + ] + } } } \ No newline at end of file From 4a76b0dd0ffd896caf35aa42df8d8a304b3accca Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Wed, 2 Mar 2016 21:21:15 -0800 Subject: [PATCH 078/291] Remove project name from output path - aspnet/Coherence-Signed#187 - remove `` settings but maintain other unique aspects e.g. `` - in a few cases, standardize on VS version `14.0` and not something more specific --- .../ServerComparison.FunctionalTests.xproj | 2 +- .../ServerComparison.TestSites.xproj | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj index 9474f8e79c..a53802bc22 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj @@ -8,7 +8,7 @@ a319acce-060b-4385-9534-9f2202f6180e ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ + ..\..\artifacts\bin\ 2.0 diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj index be51354920..18923dfc62 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj @@ -7,9 +7,8 @@ 030225d8-4ee8-47e5-b692-2a96b3b51a38 - ServerComparison.TestSites ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ + ..\..\artifacts\bin\ 2.0 From aa28b85d6addffcf7d0f608c46c323e981457f15 Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 4 Mar 2016 10:51:22 -0800 Subject: [PATCH 079/291] Reacting to Hosting deployers change --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 1 + test/ServerComparison.FunctionalTests/ResponseTests.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index af1c83b51c..2098330f0e 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -65,6 +65,7 @@ namespace ServerComparison.FunctionalTests EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index aff7d855ff..336e6f1777 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -118,6 +118,7 @@ namespace ServerComparison.FunctionalTests EnvironmentName = "Responses", ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, SiteName = "HttpTestSite", // This is configured in the Http.config + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) From 0269403bc9bb2732388457d2a9def489ab343856 Mon Sep 17 00:00:00 2001 From: Victor Hurdugaci Date: Mon, 7 Mar 2016 20:55:01 -0800 Subject: [PATCH 080/291] Update the build scripts to the latest version --- build.ps1 | 33 ++++++++++++++++++++++++++++++++- build.sh | 15 +++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/build.ps1 b/build.ps1 index 4fd24a30d5..8f2f99691a 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,3 +1,33 @@ +$ErrorActionPreference = "Stop" + +function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) +{ + while($true) + { + try + { + Invoke-WebRequest $url -OutFile $downloadLocation + break + } + catch + { + $exceptionMessage = $_.Exception.Message + Write-Host "Failed to download '$url': $exceptionMessage" + if ($retries -gt 0) { + $retries-- + Write-Host "Waiting 10 seconds before retrying. Retries left: $retries" + Start-Sleep -Seconds 10 + + } + else + { + $exception = $_.Exception + throw $exception + } + } + } +} + cd $PSScriptRoot $repoFolder = $PSScriptRoot @@ -20,7 +50,8 @@ if (!(Test-Path $buildFolder)) { $localZipFile="$tempFolder\korebuild.zip" - Invoke-WebRequest $koreBuildZip -OutFile $localZipFile + DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6 + Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) diff --git a/build.sh b/build.sh index 79638d06b6..f4208100eb 100755 --- a/build.sh +++ b/build.sh @@ -18,7 +18,18 @@ if test ! -d $buildFolder; then localZipFile="$tempFolder/korebuild.zip" - wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip /dev/null + retries=6 + until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null) + do + echo "Failed to download '$koreBuildZip'" + if [ "$retries" -le 0 ]; then + exit 1 + fi + retries=$((retries - 1)) + echo "Waiting 10 seconds before retrying. Retries left: $retries" + sleep 10s + done + unzip -q -d $tempFolder $localZipFile mkdir $buildFolder @@ -32,4 +43,4 @@ if test ! -d $buildFolder; then fi fi -$buildFile -r $repoFolder "$@" +$buildFile -r $repoFolder "$@" \ No newline at end of file From 1b29f5e973927b496399344c09545ac6d32b12cf Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 8 Mar 2016 14:36:27 -0800 Subject: [PATCH 081/291] Reacting to KoreBuild changes --- test/ServerComparison.FunctionalTests/Helpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 073b74b19f..5e57d68d9d 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -10,7 +10,7 @@ namespace ServerComparison.FunctionalTests { public static string GetApplicationPath() { - return Path.GetFullPath(Path.Combine("..", "..", "..", "ServerComparison.TestSites")); + return Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", "ServerComparison.TestSites")); } } } \ No newline at end of file From 5840689f644858e08f84bf9c4afa54326df8f0f7 Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 9 Mar 2016 14:21:20 -0800 Subject: [PATCH 082/291] Switch from HttpPlatformHandler to AspNetCoreModule. --- .../Http.config | 6 +++--- .../NtlmAuthentation.config | 6 +++--- .../ResponseTests.cs | 20 +++++++++---------- test/ServerComparison.TestSites/Program.cs | 4 ++-- .../StartupNtlmAuthentication.cs | 2 +- test/ServerComparison.TestSites/project.json | 2 +- .../wwwroot/web.config | 4 ++-- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/Http.config b/test/ServerComparison.FunctionalTests/Http.config index b1b08c8b1d..5ef47a0ae4 100644 --- a/test/ServerComparison.FunctionalTests/Http.config +++ b/test/ServerComparison.FunctionalTests/Http.config @@ -118,7 +118,7 @@
-
+
@@ -253,7 +253,7 @@ - + @@ -928,7 +928,7 @@ - + diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentation.config b/test/ServerComparison.FunctionalTests/NtlmAuthentation.config index f821bafb01..f0f7436f6e 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentation.config +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentation.config @@ -118,7 +118,7 @@
-
+
@@ -253,7 +253,7 @@ - + @@ -928,7 +928,7 @@ - + diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 336e6f1777..f2bf0772ea 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -53,15 +53,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); } - // [ConditionalTheory] - // [OSSkipCondition(OperatingSystems.Linux)] - // [OSSkipCondition(OperatingSystems.MacOSX)] - // // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] // https://github.com/aspnet/IISIntegration/issues/7 - // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5079/")] - // public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) - // { - // return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); - // } + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5079/")] + public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + } [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5080/")] @@ -73,7 +73,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/")] // https://github.com/aspnet/IISIntegration/issues/7 + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5082/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index d63b989a19..e8941b23dd 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -10,9 +10,9 @@ namespace ServerComparison.TestSites public static void Main(string[] args) { var host = new WebHostBuilder() - .UseServer ("Microsoft.AspNetCore.Server.Kestrel") + .UseServer("Microsoft.AspNetCore.Server.Kestrel") .UseDefaultConfiguration(args) - .UseIISPlatformHandlerUrl() + .UseIISUrl() .UseStartup("ServerComparison.TestSites") .Build(); diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index ed365f47d1..383487e1f2 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -57,7 +57,7 @@ namespace ServerComparison.TestSites } else { - app.UseIISPlatformHandler(); + app.UseIIS(); } app.Use((context, next) => diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 0c2cfb387e..1d11f21f3c 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,7 +1,7 @@ { "version": "1.0.0-*", "dependencies": { - "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*", "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", diff --git a/test/ServerComparison.TestSites/wwwroot/web.config b/test/ServerComparison.TestSites/wwwroot/web.config index fe1beaa3f3..0d1d5c2520 100644 --- a/test/ServerComparison.TestSites/wwwroot/web.config +++ b/test/ServerComparison.TestSites/wwwroot/web.config @@ -1,8 +1,8 @@ - + - + \ No newline at end of file From 7ae9315cdeeb348b281dd713e326a1098ca81174 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 14 Mar 2016 15:38:23 -0700 Subject: [PATCH 083/291] React to IISIntegration changes. --- test/ServerComparison.TestSites/Program.cs | 2 +- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index e8941b23dd..797a6d93ab 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -12,7 +12,7 @@ namespace ServerComparison.TestSites var host = new WebHostBuilder() .UseServer("Microsoft.AspNetCore.Server.Kestrel") .UseDefaultConfiguration(args) - .UseIISUrl() + .UseIIS() .UseStartup("ServerComparison.TestSites") .Build(); diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 383487e1f2..df1d0070bb 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -4,7 +4,6 @@ using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Server; @@ -55,10 +54,6 @@ namespace ServerComparison.TestSites listener.AuthenticationManager.AuthenticationSchemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; } - else - { - app.UseIIS(); - } app.Use((context, next) => { From 204f8a3a8e54a22dca57206a34808e954fc19ceb Mon Sep 17 00:00:00 2001 From: Cesar Blum Silveira Date: Mon, 14 Mar 2016 21:30:16 -0700 Subject: [PATCH 084/291] ASP.NET 5 -> ASP.NET Core --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20b98a98bd..a4eaf48f5b 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,4 @@ Travis: [![Travis](https://travis-ci.org/aspnet/ServerTests.svg?branch=dev)](h This repo hosts Helios, WebListener and Kestrel tests. -This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo. +This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo. From ece8d1954ac70170aac5e07aad6d2190b5649b27 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 22 Mar 2016 14:52:11 -0700 Subject: [PATCH 085/291] Reacting to CoreCLR package changes --- test/ServerComparison.FunctionalTests/project.json | 3 --- test/ServerComparison.TestSites/project.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 644902033e..b8db42428d 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -17,9 +17,6 @@ "frameworks": { "net451": { - "dependencies": { - "xunit.runner.console": "2.1.0" - }, "frameworkAssemblies": { "System.Runtime": "" } diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 1d11f21f3c..f0ae10e1cd 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -19,9 +19,6 @@ "frameworks": { "dnx451": {}, "netstandardapp1.5": { - "dependencies": { - "NETStandard.Library": "1.0.0-*" - }, "imports": [ "dnxcore50", "portable-net451+win8" From 808d91c0e456fd164baff18821bd3d5268491d71 Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 22 Mar 2016 11:49:00 -0700 Subject: [PATCH 086/291] Reacting to Hosting changes --- test/ServerComparison.TestSites/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index 797a6d93ab..b6f681ae20 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -11,7 +11,7 @@ namespace ServerComparison.TestSites { var host = new WebHostBuilder() .UseServer("Microsoft.AspNetCore.Server.Kestrel") - .UseDefaultConfiguration(args) + .UseDefaultHostingConfiguration(args) .UseIIS() .UseStartup("ServerComparison.TestSites") .Build(); From 91ba4154c617726960f085c17c9fa242cf3e8503 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Fri, 25 Mar 2016 09:32:26 -0700 Subject: [PATCH 087/291] Fixed tests --- test/ServerComparison.TestSites/project.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index f0ae10e1cd..074b3c6d60 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -7,7 +7,6 @@ "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.NETCore.Platforms": "1.0.1-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, "compilationOptions": { @@ -22,7 +21,10 @@ "imports": [ "dnxcore50", "portable-net451+win8" - ] + ], + "dependencies": { + "NETStandard.Library": "1.5.0-*" + } } } } \ No newline at end of file From 27c32d073fc2a51b21c5ff9c9ad9ecf68a5bde15 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Wed, 23 Mar 2016 22:54:14 +0000 Subject: [PATCH 088/291] Adding Nginx to test runs --- .../HelloWorldTest.cs | 15 ++++++- .../NtlmAuthentationTest.cs | 4 +- .../ResponseTests.cs | 43 ++++++++++++------- .../nginx.conf | 34 +++++++++++++++ .../project.json | 3 +- 5 files changed, 79 insertions(+), 20 deletions(-) create mode 100644 test/ServerComparison.FunctionalTests/nginx.conf diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 2098330f0e..f1dee79540 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -34,6 +34,7 @@ namespace ServerComparison.FunctionalTests [Theory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5067/")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/")] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); @@ -59,11 +60,21 @@ namespace ServerComparison.FunctionalTests using (logger.BeginScope("HelloWorldTest")) { + string content = null; + if (serverType == ServerType.IISExpress) + { + content = File.ReadAllText("Http.config"); + } + else if (serverType == ServerType.Nginx) + { + content = File.ReadAllText("nginx.conf"); + } + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', - ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, + ServerConfigTemplateContent = content, SiteName = "HttpTestSite", // This is configured in the Http.config PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; @@ -95,4 +106,4 @@ namespace ServerComparison.FunctionalTests } } } -} \ No newline at end of file +} diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs index 0cced5abd9..92eecda5cb 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs @@ -37,7 +37,7 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' - ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, + ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config }; @@ -130,4 +130,4 @@ namespace ServerComparison.FunctionalTests } } } -} \ No newline at end of file +} diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index f2bf0772ea..d311e10fa6 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -16,7 +16,7 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - // Uses ports ranging 5070 - 5079. + // Uses ports ranging 5070 - 5089. public class ResponseTests { [ConditionalTheory] @@ -31,6 +31,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5074/")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); @@ -39,15 +40,15 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5075/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5076/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5076/")] // https://github.com/aspnet/IISIntegration/issues/7 + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5077/")] public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5077/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5078/")] public Task ResponseFormats_Kestrel_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); @@ -56,15 +57,16 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5078/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5079/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5079/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5080/")] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5080/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5081/")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/")] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); @@ -73,15 +75,16 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5082/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5083/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5084/")] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5086/")] public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); @@ -90,15 +93,15 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5084/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5085/")] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5087/")] // https://github.com/aspnet/IISIntegration/issues/7 + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5088/")] public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5086/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/")] public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); @@ -112,11 +115,21 @@ namespace ServerComparison.FunctionalTests using (logger.BeginScope("ResponseFormatsTest")) { + string content = null; + if (serverType == ServerType.IISExpress) + { + content = File.ReadAllText("Http.config"); + } + else if (serverType == ServerType.Nginx) + { + content = File.ReadAllText("nginx.conf"); + } + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", - ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, + ServerConfigTemplateContent = content, SiteName = "HttpTestSite", // This is configured in the Http.config PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; @@ -252,4 +265,4 @@ namespace ServerComparison.FunctionalTests return response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out values) ? values.FirstOrDefault() : null; } } -} \ No newline at end of file +} diff --git a/test/ServerComparison.FunctionalTests/nginx.conf b/test/ServerComparison.FunctionalTests/nginx.conf new file mode 100644 index 0000000000..8547cf500a --- /dev/null +++ b/test/ServerComparison.FunctionalTests/nginx.conf @@ -0,0 +1,34 @@ +user [user]; +worker_processes 4; +pid [pidFile]; + +events { + worker_connections 768; +} + +http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 10; + types_hash_max_size 2048; + + default_type application/octet-stream; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + + gzip on; + gzip_disable "msie6"; + + server { + listen [listenPort]; + location / { + proxy_pass [redirectUri]; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + } +} diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index b8db42428d..22968b8871 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -12,6 +12,7 @@ "content": [ "Http.config", + "nginx.conf", "NtlmAuthentation.config" ], @@ -22,4 +23,4 @@ } } } -} \ No newline at end of file +} From dfb7f2f9b2a54840e1cafc055d18deaffd7c2aac Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Wed, 23 Mar 2016 16:18:18 -0700 Subject: [PATCH 089/291] Fixups --- .../HelloWorldTest.cs | 10 +++++-- .../ResponseTests.cs | 27 ++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index f1dee79540..11cce9f1c8 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -32,14 +32,20 @@ namespace ServerComparison.FunctionalTests } [Theory] - [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5067/")] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/")] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/")] + public Task HelloWorld_Unix(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + } + [ConditionalTheory] [SkipIfIISVariationsNotEnabled] [OSSkipCondition(OperatingSystems.Linux)] diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index d311e10fa6..185a7f5ab5 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -31,12 +31,19 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5074/")] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); } + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] + public Task ResponseFormats_Unix_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); + } + [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] @@ -66,12 +73,19 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5081/")] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/")] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); } + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/")] + public Task ResponseFormats_Unix_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + } + [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] @@ -84,12 +98,19 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/")] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5086/")] public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); } + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5086/")] + public Task ResponseFormats_Unix_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); + } + [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] From f272d993deca66175dc48be3f5ab14e22d15208e Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Wed, 23 Mar 2016 16:33:06 -0700 Subject: [PATCH 090/291] Helper --- .../HelloWorldTest.cs | 12 +----------- .../ServerComparison.FunctionalTests/Helpers.cs | 17 ++++++++++++++++- .../ResponseTests.cs | 12 +----------- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 11cce9f1c8..daa902bb4f 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -66,21 +66,11 @@ namespace ServerComparison.FunctionalTests using (logger.BeginScope("HelloWorldTest")) { - string content = null; - if (serverType == ServerType.IISExpress) - { - content = File.ReadAllText("Http.config"); - } - else if (serverType == ServerType.Nginx) - { - content = File.ReadAllText("nginx.conf"); - } - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', - ServerConfigTemplateContent = content, + ServerConfigTemplateContent = Helpers.GetConfigContent(serverType), SiteName = "HttpTestSite", // This is configured in the Http.config PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 5e57d68d9d..81c4b3b88f 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -1,8 +1,8 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.IO; +using Microsoft.AspNetCore.Server.Testing; namespace ServerComparison.FunctionalTests { @@ -12,5 +12,20 @@ namespace ServerComparison.FunctionalTests { return Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", "ServerComparison.TestSites")); } + + public static string GetConfigContent(ServerType serverType) + { + string content = null; + if (serverType == ServerType.IISExpress) + { + content = File.ReadAllText("Http.config"); + } + else if (serverType == ServerType.Nginx) + { + content = File.ReadAllText("nginx.conf"); + } + + return content; + } } } \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 185a7f5ab5..e50c842511 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -136,21 +136,11 @@ namespace ServerComparison.FunctionalTests using (logger.BeginScope("ResponseFormatsTest")) { - string content = null; - if (serverType == ServerType.IISExpress) - { - content = File.ReadAllText("Http.config"); - } - else if (serverType == ServerType.Nginx) - { - content = File.ReadAllText("nginx.conf"); - } - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", - ServerConfigTemplateContent = content, + ServerConfigTemplateContent = Helpers.GetConfigContent(serverType), SiteName = "HttpTestSite", // This is configured in the Http.config PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; From 06a0d4f3e1b89a4aee2b52da624cb731bdc64fad Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Thu, 24 Mar 2016 08:46:06 -0700 Subject: [PATCH 091/291] Update --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- test/ServerComparison.FunctionalTests/Helpers.cs | 6 +++--- .../{NtlmAuthentation.config => NtlmAuthentication.config} | 0 .../{NtlmAuthentationTest.cs => NtlmAuthenticationTest.cs} | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- test/ServerComparison.FunctionalTests/project.json | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename test/ServerComparison.FunctionalTests/{NtlmAuthentation.config => NtlmAuthentication.config} (100%) rename test/ServerComparison.FunctionalTests/{NtlmAuthentationTest.cs => NtlmAuthenticationTest.cs} (98%) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index daa902bb4f..f30a5373e1 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -70,7 +70,7 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', - ServerConfigTemplateContent = Helpers.GetConfigContent(serverType), + ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 81c4b3b88f..8f362038b0 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -13,16 +13,16 @@ namespace ServerComparison.FunctionalTests return Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", "ServerComparison.TestSites")); } - public static string GetConfigContent(ServerType serverType) + public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig) { string content = null; if (serverType == ServerType.IISExpress) { - content = File.ReadAllText("Http.config"); + content = File.ReadAllText(iisConfig); } else if (serverType == ServerType.Nginx) { - content = File.ReadAllText("nginx.conf"); + content = File.ReadAllText(nginxConfig); } return content; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentation.config b/test/ServerComparison.FunctionalTests/NtlmAuthentication.config similarity index 100% rename from test/ServerComparison.FunctionalTests/NtlmAuthentation.config rename to test/ServerComparison.FunctionalTests/NtlmAuthentication.config diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs similarity index 98% rename from test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs rename to test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 92eecda5cb..e7d05f69e5 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -37,7 +37,7 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' - ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, + ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "NtlmAuthentication.config", nginxConfig: null), SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index e50c842511..8af4f7dece 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -140,7 +140,7 @@ namespace ServerComparison.FunctionalTests { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", - ServerConfigTemplateContent = Helpers.GetConfigContent(serverType), + ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" }; diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 22968b8871..280c734169 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -13,7 +13,7 @@ "content": [ "Http.config", "nginx.conf", - "NtlmAuthentation.config" + "NtlmAuthentication.config" ], "frameworks": { From 2952fb90cc8c2eb6d2aacaea041692688db074b7 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Fri, 25 Mar 2016 11:34:05 -0700 Subject: [PATCH 092/291] Feedback --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 6 +++--- test/ServerComparison.FunctionalTests/ResponseTests.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index f30a5373e1..b689fdbf1a 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -24,14 +24,14 @@ namespace ServerComparison.FunctionalTests [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/")] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/")] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } [Theory] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/")] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5067/")] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -41,7 +41,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/")] - public Task HelloWorld_Unix(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); } diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 8af4f7dece..96f94f813b 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -39,7 +39,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] - public Task ResponseFormats_Unix_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); } @@ -81,7 +81,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/")] - public Task ResponseFormats_Unix_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); } @@ -106,7 +106,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5086/")] - public Task ResponseFormats_Unix_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); } From 6950d441d173c448aed1ac36343737891281cadd Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 30 Mar 2016 15:46:08 -0700 Subject: [PATCH 093/291] React to Kestrel extensions --- test/ServerComparison.TestSites/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index b6f681ae20..bd97120ab4 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -10,7 +10,7 @@ namespace ServerComparison.TestSites public static void Main(string[] args) { var host = new WebHostBuilder() - .UseServer("Microsoft.AspNetCore.Server.Kestrel") + .UseKestrel() .UseDefaultHostingConfiguration(args) .UseIIS() .UseStartup("ServerComparison.TestSites") @@ -20,3 +20,4 @@ namespace ServerComparison.TestSites } } } + From b12a97146b0df1c07897f20241280ddaa295e867 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Mon, 28 Mar 2016 09:06:44 -0700 Subject: [PATCH 094/291] Add travis and Nginx --- .travis.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..b26ae5ea26 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,31 @@ +language: csharp +sudo: required +dist: trusty +addons: + apt: + packages: + - libunwind8 +before_install: + - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; fi +install: + - curl -sSL http://nginx.org/download/nginx-1.8.0.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.8.0/ + - ./configure --prefix=$HOME/nginxinstall --with-http_ssl_module + - make + - make install + - export PATH="$PATH:$HOME/nginxinstall/sbin/" + - cd $OLDPWD +mono: + - 4.0.5 +os: + - linux + - osx +osx_image: xcode7.1 +branches: + only: + - master + - release + - dev + - /^(.*\/)?ci-.*$/ +script: + - ./build.sh --quiet verify + From 16e2788b6b0e455c8188230d53ac78844b72b3ce Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Wed, 30 Mar 2016 09:51:19 -0700 Subject: [PATCH 095/291] Appveyor --- appveyor.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..b9a9bcd1e6 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,13 @@ +init: + - git config --global core.autocrlf true +branches: + only: + - master + - release + - dev + - /^(.*\/)?ci-.*$/ +build_script: + - build.cmd verify +clone_depth: 1 +test: off +deploy: off \ No newline at end of file From e37868b0a44ff05113d684fdb45d2f8224bbfbea Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 6 Apr 2016 09:47:11 -0700 Subject: [PATCH 096/291] Updating to release. --- NuGet.config | 2 +- build.ps1 | 2 +- build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NuGet.config b/NuGet.config index 52bf414192..71b9724a09 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + diff --git a/build.ps1 b/build.ps1 index 8f2f99691a..cf8bff13bb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/release.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index f4208100eb..f88fe4052e 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/release.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi From c3d382565141a05f80bd3455ffc4f110cc442cb2 Mon Sep 17 00:00:00 2001 From: Chris R Date: Thu, 7 Apr 2016 11:49:49 -0700 Subject: [PATCH 097/291] React to UseIIS rename. --- test/ServerComparison.TestSites/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index bd97120ab4..d2256beb6f 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -12,7 +12,7 @@ namespace ServerComparison.TestSites var host = new WebHostBuilder() .UseKestrel() .UseDefaultHostingConfiguration(args) - .UseIIS() + .UseIISIntegration() .UseStartup("ServerComparison.TestSites") .Build(); From f31e9969c7cecd0c578b7dc4718e7d2dc057993a Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Fri, 8 Apr 2016 15:05:45 -0700 Subject: [PATCH 098/291] Changed DNX451 references to NET451 --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index b689fdbf1a..d66e61fa5e 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -72,7 +72,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 - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "NET451" : "netstandardapp1.5" }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 96f94f813b..2d36ac7a94 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -142,7 +142,7 @@ namespace ServerComparison.FunctionalTests EnvironmentName = "Responses", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5" + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "NET451" : "netstandardapp1.5" }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) From 4423e4af38e2f333d8cfd9db668636131e9f7a61 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Fri, 8 Apr 2016 15:15:29 -0700 Subject: [PATCH 099/291] Changed DNX451 references to NET451 --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index d66e61fa5e..ef8c2bb812 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -72,7 +72,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 - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "NET451" : "netstandardapp1.5" + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netstandardapp1.5" }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 2d36ac7a94..a1e4f14888 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -142,7 +142,7 @@ namespace ServerComparison.FunctionalTests EnvironmentName = "Responses", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "NET451" : "netstandardapp1.5" + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netstandardapp1.5" }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 074b3c6d60..0811c11db8 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -16,7 +16,7 @@ "wwwroot/**/*" ], "frameworks": { - "dnx451": {}, + "net451": {}, "netstandardapp1.5": { "imports": [ "dnxcore50", From f75609dedd5f976ac52d057a949be8e0505f5c96 Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 6 Apr 2016 16:18:54 -0700 Subject: [PATCH 100/291] Move web.config to application root --- test/ServerComparison.TestSites/project.json | 2 +- test/ServerComparison.TestSites/web.config | 9 +++++++++ test/ServerComparison.TestSites/wwwroot/web.config | 8 -------- 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 test/ServerComparison.TestSites/web.config delete mode 100644 test/ServerComparison.TestSites/wwwroot/web.config diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 0811c11db8..921f753374 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -13,7 +13,7 @@ "emitEntryPoint": true }, "content": [ - "wwwroot/**/*" + "web.config" ], "frameworks": { "net451": {}, diff --git a/test/ServerComparison.TestSites/web.config b/test/ServerComparison.TestSites/web.config new file mode 100644 index 0000000000..e91ebb7555 --- /dev/null +++ b/test/ServerComparison.TestSites/web.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/test/ServerComparison.TestSites/wwwroot/web.config b/test/ServerComparison.TestSites/wwwroot/web.config deleted file mode 100644 index 0d1d5c2520..0000000000 --- a/test/ServerComparison.TestSites/wwwroot/web.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 6dc0005a43e919b1d179739af9071f7c2b5d2349 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 14 Apr 2016 11:36:02 -0700 Subject: [PATCH 101/291] Use UseServer() instead of UseKestrel() to allow override in tests --- test/ServerComparison.TestSites/Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index d2256beb6f..65b7e9f3d5 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -10,7 +10,9 @@ namespace ServerComparison.TestSites public static void Main(string[] args) { var host = new WebHostBuilder() - .UseKestrel() + // We set the server by name before default args so that command line arguments can override it. + // This is used to allow deployers to choose the server for testing. + .UseServer("Microsoft.AspNetCore.Server.Kestrel") .UseDefaultHostingConfiguration(args) .UseIISIntegration() .UseStartup("ServerComparison.TestSites") From 7e95bf71ebbbdb8e25477fd88eb855b042b16721 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 18 Apr 2016 10:07:57 -0700 Subject: [PATCH 102/291] React to WebListener configuration changes. --- test/ServerComparison.TestSites/Program.cs | 35 +++++++++++++++---- .../StartupHelloWorld.cs | 13 ------- .../StartupNtlmAuthentication.cs | 23 ------------ test/ServerComparison.TestSites/web.config | 2 +- 4 files changed, 30 insertions(+), 43 deletions(-) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index 65b7e9f3d5..a4c6a661ee 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Hosting; +using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites { @@ -9,14 +10,36 @@ namespace ServerComparison.TestSites { public static void Main(string[] args) { - var host = new WebHostBuilder() - // We set the server by name before default args so that command line arguments can override it. - // This is used to allow deployers to choose the server for testing. - .UseServer("Microsoft.AspNetCore.Server.Kestrel") + var builder = new WebHostBuilder() .UseDefaultHostingConfiguration(args) .UseIISIntegration() - .UseStartup("ServerComparison.TestSites") - .Build(); + .UseStartup("ServerComparison.TestSites"); + + // Switch beteween Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. + if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) + { + if (string.Equals(builder.GetSetting("environment"), "NtlmAuthentication", System.StringComparison.Ordinal)) + { + // Set up NTLM authentication for WebListener as follows. + // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or + // modify the applicationHost.config to enable NTLM. + builder.UseWebListener(options => + { + options.Listener.AuthenticationManager.AuthenticationSchemes = + AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; + }); + } + else + { + builder.UseWebListener(); + } + } + else + { + builder.UseKestrel(); + } + + var host = builder.Build(); host.Run(); } diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index b2d386bf3b..0c387f1b59 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -7,19 +7,6 @@ using Microsoft.Extensions.Logging; namespace ServerComparison.TestSites { - /// - /// To make runtime to load an environment based startup class, specify the environment by the following ways: - /// 1. Drop a Microsoft.AspNetCore.Hosting.ini file in the wwwroot folder - /// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named - /// 'StartupHelloWorld' the value of the env should be 'HelloWorld' (eg. ASPNET_ENV=HelloWorld). Runtime adds a 'Startup' prefix to this and loads 'StartupHelloWorld'. - /// If no environment name is specified the default startup class loaded is 'Startup'. - /// Alternative ways to specify environment are: - /// 1. Set the environment variable named SET ASPNET_ENV=HelloWorld - /// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg: - /// "commands": { - /// "web": "Microsoft.AspNetCore.Hosting --server Microsoft.AspNetCore.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV HelloWorld", - /// }, - /// public class StartupHelloWorld { public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index df1d0070bb..639c747e35 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -5,23 +5,9 @@ using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites { - /// - /// To make runtime to load an environment based startup class, specify the environment by the following ways: - /// 1. Drop a Microsoft.AspNetCore.Hosting.ini file in the wwwroot folder - /// 2. Add a setting in the ini file named 'ASPNET_ENV' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named - /// 'StartupNtlmAuthentication' the value of the env should be 'NtlmAuthentication' (eg. ASPNET_ENV=NtlmAuthentication). Runtime adds a 'Startup' prefix to this and loads 'StartupNtlmAuthentication'. - /// If no environment name is specified the default startup class loaded is 'Startup'. - /// Alternative ways to specify environment are: - /// 1. Set the environment variable named SET ASPNET_ENV=NtlmAuthentication - /// 2. For selfhost based servers pass in a command line variable named --env with this value. Eg: - /// "commands": { - /// "web": "Microsoft.AspNetCore.Hosting --server Microsoft.AspNetCore.Server.WebListener --server.urls http://localhost:5002 --ASPNET_ENV NtlmAuthentication", - /// }, - /// public class StartupNtlmAuthentication { public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) @@ -46,15 +32,6 @@ namespace ServerComparison.TestSites } }); - // Set up NTLM authentication for WebListener like below. - // For IIS and IISExpress: Use inetmgr to setup NTLM authentication on the application vDir or modify the applicationHost.config to enable NTLM. - var listener = app.ServerFeatures.Get(); - if (listener != null) - { - listener.AuthenticationManager.AuthenticationSchemes = - AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; - } - app.Use((context, next) => { if (context.Request.Path.Equals("/Anonymous")) diff --git a/test/ServerComparison.TestSites/web.config b/test/ServerComparison.TestSites/web.config index e91ebb7555..c3b3c87088 100644 --- a/test/ServerComparison.TestSites/web.config +++ b/test/ServerComparison.TestSites/web.config @@ -4,6 +4,6 @@ - + \ No newline at end of file From 27c0250550a0e0601578facef8952a5c01af2e08 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 21 Apr 2016 15:28:32 -0700 Subject: [PATCH 103/291] React to Hosting changes --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index ef8c2bb812..b3f07a085c 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -47,7 +47,7 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [SkipIfIISVariationsNotEnabled] + [SkipIfEnvironmentVariableNotEnabled("IIS_VARIATIONS_ENABLED")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [SkipIfCurrentRuntimeIsCoreClr] From aa8e908fc7d799641f91d663d756529a28fadfa5 Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 20 Apr 2016 12:17:34 -0700 Subject: [PATCH 104/291] Convert to portable and add tests for standalone and portable --- ServerTests.sln | 9 +- .../HelloWorldTest.cs | 48 ++++---- .../Helpers.cs | 5 +- .../NtlmAuthenticationTest.cs | 16 +-- .../ResponseTests.cs | 107 ++++++++++-------- .../Program.cs | 48 ++++++++ .../Properties/AssemblyInfo.cs | 19 ++++ ...erverComparison.TestSites.Standalone.xproj | 21 ++++ .../project.json | 47 ++++++++ .../web.config | 9 ++ test/ServerComparison.TestSites/project.json | 16 ++- test/ServerComparison.TestSites/web.config | 2 +- 12 files changed, 263 insertions(+), 84 deletions(-) create mode 100644 test/ServerComparison.TestSites.Standalone/Program.cs create mode 100644 test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs create mode 100644 test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj create mode 100644 test/ServerComparison.TestSites.Standalone/project.json create mode 100644 test/ServerComparison.TestSites.Standalone/web.config diff --git a/ServerTests.sln b/ServerTests.sln index 7a7cebf0a7..7ebd72856d 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.22807.0 +VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5B0A1907-2525-4081-AE14-255D3CE65B62}" EndProject @@ -16,6 +16,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.Functional EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.TestSites", "test\ServerComparison.TestSites\ServerComparison.TestSites.xproj", "{030225D8-4EE8-47E5-B692-2A96B3B51A38}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.TestSites.Standalone", "test\ServerComparison.TestSites.Standalone\ServerComparison.TestSites.Standalone.xproj", "{A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,6 +32,10 @@ Global {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Debug|Any CPU.Build.0 = Debug|Any CPU {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Release|Any CPU.ActiveCfg = Release|Any CPU {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Release|Any CPU.Build.0 = Release|Any CPU + {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -37,5 +43,6 @@ Global GlobalSection(NestedProjects) = preSolution {A319ACCE-060B-4385-9534-9F2202F6180E} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} {030225D8-4EE8-47E5-B692-2A96B3B51A38} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} + {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} EndGlobalSection EndGlobal diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index ef8c2bb812..b8bb565b59 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -20,30 +20,33 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/")] - //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/")] - public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/", ApplicationType.Portable)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/", ApplicationType.Portable)] + //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5065/", ApplicationType.Standalone)] + public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); } [Theory] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5065/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5067/")] - public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5066/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5067/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5069/", ApplicationType.Standalone)] + public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/")] - public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5070/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5071/", ApplicationType.Standalone)] + public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); } [ConditionalTheory] @@ -51,28 +54,29 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5069/")] - //[InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/")] - public Task HelloWorld_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5072/", ApplicationType.Portable)] + //[InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5073/", ApplicationType.Portable)] + public Task HelloWorld_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); } - public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { var logger = new LoggerFactory() .AddConsole() - .CreateLogger(string.Format("HelloWorld:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); + .CreateLogger(string.Format("HelloWorld:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); using (logger.BeginScope("HelloWorldTest")) { - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, 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 - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netstandardapp1.5" + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0", + ApplicationType = applicationType }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 8f362038b0..5410e11c6f 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -8,9 +8,10 @@ namespace ServerComparison.FunctionalTests { public class Helpers { - public static string GetApplicationPath() + public static string GetApplicationPath(ApplicationType applicationType) { - return Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", "ServerComparison.TestSites")); + return Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", + applicationType == ApplicationType.Standalone? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites")); } public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index e7d05f69e5..e89f30f7ad 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -21,24 +21,26 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // TODO: https://github.com/aspnet/IISIntegration/issues/1 - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] - // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/")] - public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/", ApplicationType.Portable)] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/", ApplicationType.Portable)] + // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5053/", ApplicationType.Standalone)] + public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { var logger = new LoggerFactory() .AddConsole() - .CreateLogger(string.Format("Ntlm:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); + .CreateLogger(string.Format("Ntlm:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); using (logger.BeginScope("NtlmAuthenticationTest")) { - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, 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 + ApplicationType = applicationType }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index a1e4f14888..52f2435317 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -16,133 +16,142 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - // Uses ports ranging 5070 - 5089. + // Uses ports ranging 5080 - 5099. public class ResponseTests { [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5072/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5073/")] - public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5080/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/", ApplicationType.Portable)] + public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5074/")] - public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/", ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5075/")] - public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5084/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/", ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5076/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5077/")] - public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5086/", ApplicationType.Portable)] // https://github.com/aspnet/IISIntegration/issues/7 + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5087/", ApplicationType.Portable)] + public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5078/")] - public Task ResponseFormats_Kestrel_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5079/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5080/")] - public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5090/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5091/", ApplicationType.Portable)] + public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5081/")] - public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5092/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5093/", ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/")] - public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5094/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5095/", ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5083/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5084/")] - public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5096/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5097/", ApplicationType.Portable)] + public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/")] - public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5098/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5099/", ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5086/")] - public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5100/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5087/")] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5088/")] - public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5102/", ApplicationType.Portable)] // https://github.com/aspnet/IISIntegration/issues/7 + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Portable)] + public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/")] - public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync, applicationType); } - public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario) + public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario, ApplicationType applicationType) { var logger = new LoggerFactory() .AddConsole() - .CreateLogger(string.Format("ResponseFormats:{0}:{1}:{2}", serverType, runtimeFlavor, architecture)); + .CreateLogger(string.Format("ResponseFormats:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); using (logger.BeginScope("ResponseFormatsTest")) { - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netstandardapp1.5" + PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0", + ApplicationType = applicationType }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs new file mode 100644 index 0000000000..a49369bf2a --- /dev/null +++ b/test/ServerComparison.TestSites.Standalone/Program.cs @@ -0,0 +1,48 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Hosting; +using Microsoft.Net.Http.Server; + +namespace ServerComparison.TestSites.Standalone +{ + public static class Program + { + public static void Main(string[] args) + { + var builder = new WebHostBuilder() + .UseDefaultHostingConfiguration(args) + .UseIISIntegration() + .UseStartup("ServerComparison.TestSites.Standalone"); + + // Switch beteween Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. + if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) + { + if (string.Equals(builder.GetSetting("environment"), "NtlmAuthentication", System.StringComparison.Ordinal)) + { + // Set up NTLM authentication for WebListener as follows. + // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or + // modify the applicationHost.config to enable NTLM. + builder.UseWebListener(options => + { + options.Listener.AuthenticationManager.AuthenticationSchemes = + AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; + }); + } + else + { + builder.UseWebListener(); + } + } + else + { + builder.UseKestrel(); + } + + var host = builder.Build(); + + host.Run(); + } + } +} + diff --git a/test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs b/test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..e1e9c37584 --- /dev/null +++ b/test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ServerComparison.TestSites.Standalone")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a7c46df3-0a33-4919-a22c-1c8affadc0be")] diff --git a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj new file mode 100644 index 0000000000..427962a094 --- /dev/null +++ b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + a7c46df3-0a33-4919-a22c-1c8affadc0be + ServerComparison.TestSites.Standalone + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\ + v4.5.2 + + + + 2.0 + + + diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json new file mode 100644 index 0000000000..115e8f6e5e --- /dev/null +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -0,0 +1,47 @@ +{ + "version": "1.0.0-*", + "dependencies": { + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", + "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*", + "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", + "Microsoft.Extensions.Configuration.Json": "1.0.0-*", + "Microsoft.Extensions.Logging.Console": "1.0.0-*", + "Microsoft.Net.Http.Headers": "1.0.0-*" + }, + "compile": [ + "../ServerComparison.TestSites/Startup*.cs" + ], + "compilationOptions": { + "emitEntryPoint": true + }, + "content": [ + "web.config" + ], + "frameworks": { + "netcoreapp1.0": { + "imports": [ + "dnxcore50", + "portable-net451+win8" + ], + "dependencies": { + "Microsoft.NETCore.App": "1.0.0-*" + } + } + }, + "tools": { + "Microsoft.AspNetCore.Server.IISIntegration.Tools": { + "version": "1.0.0-*", + "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" + } + }, + "scripts": { + "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" + }, + "runtimes": { + "win7-x64": { }, + "win7-x86": { }, + "osx.10.10-x64": { }, + "ubuntu.14.04-x64": { } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites.Standalone/web.config b/test/ServerComparison.TestSites.Standalone/web.config new file mode 100644 index 0000000000..3379e820ea --- /dev/null +++ b/test/ServerComparison.TestSites.Standalone/web.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 921f753374..5fbc0e16ee 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -17,14 +17,26 @@ ], "frameworks": { "net451": {}, - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": [ "dnxcore50", "portable-net451+win8" ], "dependencies": { - "NETStandard.Library": "1.5.0-*" + "Microsoft.NETCore.App": { + "version": "1.0.0-*", + "type": "platform" + }, } } + }, + "tools": { + "Microsoft.AspNetCore.Server.IISIntegration.Tools": { + "version": "1.0.0-*", + "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" + } + }, + "scripts": { + "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" } } \ No newline at end of file diff --git a/test/ServerComparison.TestSites/web.config b/test/ServerComparison.TestSites/web.config index c3b3c87088..3379e820ea 100644 --- a/test/ServerComparison.TestSites/web.config +++ b/test/ServerComparison.TestSites/web.config @@ -4,6 +4,6 @@ - + \ No newline at end of file From d4fbbd02d0e505c953cd0b72fd8825c8b3285e13 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 27 Apr 2016 11:01:47 -0700 Subject: [PATCH 105/291] Add rid that matches build agents --- test/ServerComparison.TestSites.Standalone/project.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 115e8f6e5e..2c51616046 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -42,6 +42,7 @@ "win7-x64": { }, "win7-x86": { }, "osx.10.10-x64": { }, - "ubuntu.14.04-x64": { } + "ubuntu.14.04-x64": { }, + "ubuntu.15.04-x64": { } } } \ No newline at end of file From a0f236759db6c4eaf4cf9833049ca47a7ee4fe35 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Thu, 28 Apr 2016 09:41:08 -0700 Subject: [PATCH 106/291] Remove references to UseDefaultHostingConfiguration --- test/ServerComparison.TestSites.Standalone/Program.cs | 8 +++++++- test/ServerComparison.TestSites.Standalone/project.json | 1 + test/ServerComparison.TestSites/Program.cs | 8 +++++++- test/ServerComparison.TestSites/project.json | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs index a49369bf2a..02bbdd700c 100644 --- a/test/ServerComparison.TestSites.Standalone/Program.cs +++ b/test/ServerComparison.TestSites.Standalone/Program.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites.Standalone @@ -10,8 +11,13 @@ namespace ServerComparison.TestSites.Standalone { public static void Main(string[] args) { + var config = new ConfigurationBuilder() + .AddCommandLine(args) + .AddEnvironmentVariables(prefix: "ASPNETCORE_") + .Build(); + var builder = new WebHostBuilder() - .UseDefaultHostingConfiguration(args) + .UseConfiguration(config) .UseIISIntegration() .UseStartup("ServerComparison.TestSites.Standalone"); diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 2c51616046..f727bbf37a 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -5,6 +5,7 @@ "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*", "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", + "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index a4c6a661ee..e6d0dba35d 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites @@ -10,8 +11,13 @@ namespace ServerComparison.TestSites { public static void Main(string[] args) { + var config = new ConfigurationBuilder() + .AddCommandLine(args) + .AddEnvironmentVariables(prefix: "ASPNETCORE_") + .Build(); + var builder = new WebHostBuilder() - .UseDefaultHostingConfiguration(args) + .UseConfiguration(config) .UseIISIntegration() .UseStartup("ServerComparison.TestSites"); diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 5fbc0e16ee..06fec6c5e7 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -5,6 +5,7 @@ "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*", "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", + "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" From 7a51de05d691ad1a3ef6be2dabe9fdfd488166b3 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Thu, 28 Apr 2016 12:33:25 -0700 Subject: [PATCH 107/291] Use fallback --- test/ServerComparison.TestSites.Standalone/Program.cs | 6 ++++-- test/ServerComparison.TestSites/Program.cs | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs index 02bbdd700c..0500b08856 100644 --- a/test/ServerComparison.TestSites.Standalone/Program.cs +++ b/test/ServerComparison.TestSites.Standalone/Program.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Net.Http.Server; @@ -13,7 +14,6 @@ namespace ServerComparison.TestSites.Standalone { var config = new ConfigurationBuilder() .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") .Build(); var builder = new WebHostBuilder() @@ -24,7 +24,9 @@ namespace ServerComparison.TestSites.Standalone // Switch beteween Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) { - if (string.Equals(builder.GetSetting("environment"), "NtlmAuthentication", System.StringComparison.Ordinal)) + if (string.Equals(builder.GetSetting("environment") ?? + Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), + "NtlmAuthentication", System.StringComparison.Ordinal)) { // Set up NTLM authentication for WebListener as follows. // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index e6d0dba35d..f272541cb8 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Net.Http.Server; +using System; namespace ServerComparison.TestSites { @@ -13,9 +14,8 @@ namespace ServerComparison.TestSites { var config = new ConfigurationBuilder() .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") .Build(); - + var builder = new WebHostBuilder() .UseConfiguration(config) .UseIISIntegration() @@ -24,7 +24,9 @@ namespace ServerComparison.TestSites // Switch beteween Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) { - if (string.Equals(builder.GetSetting("environment"), "NtlmAuthentication", System.StringComparison.Ordinal)) + if (string.Equals(builder.GetSetting("environment") ?? + Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), + "NtlmAuthentication", System.StringComparison.Ordinal)) { // Set up NTLM authentication for WebListener as follows. // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or From 063a6c7c6ab76881e17fac665df0e7f1d32e6418 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 28 Apr 2016 21:08:44 -0700 Subject: [PATCH 108/291] Add osx.10.11-x64 to fix build break --- test/ServerComparison.TestSites.Standalone/project.json | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index f727bbf37a..327c6ee21b 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -43,6 +43,7 @@ "win7-x64": { }, "win7-x86": { }, "osx.10.10-x64": { }, + "osx.10.11-x64": { }, "ubuntu.14.04-x64": { }, "ubuntu.15.04-x64": { } } From 4472048169541413d937323886953e6b6b5ebe60 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 2 May 2016 11:27:27 -0700 Subject: [PATCH 109/291] Fix build warnings --- .../project.json | 28 ++++++++++++------- .../project.json | 24 ++++++++-------- test/ServerComparison.TestSites/project.json | 12 ++++---- 3 files changed, 38 insertions(+), 26 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 280c734169..9adc086cc1 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -1,21 +1,29 @@ { - "compilationOptions": { - "warningsAsErrors": true + "buildOptions": { + "warningsAsErrors": true, + "copyToOutput": { + "include": [ + "Http.config", + "nginx.conf", + "NtlmAuthentication.config" + ] + } }, "testRunner": "xunit", "dependencies": { + "dotnet-test-xunit": "1.0.0-*", "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", "Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, - - "content": [ - "Http.config", - "nginx.conf", - "NtlmAuthentication.config" - ], - + "publishOptions": { + "include": [ + "Http.config", + "nginx.conf", + "NtlmAuthentication.config" + ] + }, "frameworks": { "net451": { "frameworkAssemblies": { @@ -23,4 +31,4 @@ } } } -} +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 327c6ee21b..45e5baba44 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -1,4 +1,4 @@ -{ +{ "version": "1.0.0-*", "dependencies": { "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", @@ -13,12 +13,14 @@ "compile": [ "../ServerComparison.TestSites/Startup*.cs" ], - "compilationOptions": { + "buildOptions": { "emitEntryPoint": true }, - "content": [ - "web.config" - ], + "publishOptions": { + "include": [ + "web.config" + ] + }, "frameworks": { "netcoreapp1.0": { "imports": [ @@ -40,11 +42,11 @@ "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" }, "runtimes": { - "win7-x64": { }, - "win7-x86": { }, - "osx.10.10-x64": { }, - "osx.10.11-x64": { }, - "ubuntu.14.04-x64": { }, - "ubuntu.15.04-x64": { } + "win7-x64": {}, + "win7-x86": {}, + "osx.10.10-x64": {}, + "osx.10.11-x64": {}, + "ubuntu.14.04-x64": {}, + "ubuntu.15.04-x64": {} } } \ No newline at end of file diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 06fec6c5e7..206fe76efa 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -10,12 +10,14 @@ "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, - "compilationOptions": { + "buildOptions": { "emitEntryPoint": true }, - "content": [ - "web.config" - ], + "publishOptions": { + "include": [ + "web.config" + ] + }, "frameworks": { "net451": {}, "netcoreapp1.0": { @@ -27,7 +29,7 @@ "Microsoft.NETCore.App": { "version": "1.0.0-*", "type": "platform" - }, + } } } }, From 166e7c30e5052efc29e3b57b1b04ef0ae18cdc76 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 3 May 2016 22:32:29 -0700 Subject: [PATCH 110/291] Add Microsoft.NETCore.Platforms to allow test to succeed --- test/ServerComparison.FunctionalTests/project.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 9adc086cc1..1b6a35d595 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -15,7 +15,8 @@ "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", "Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.0.0-*" + "Microsoft.Net.Http.Headers": "1.0.0-*", + "Microsoft.NETCore.Platforms": "1.0.1-*" }, "publishOptions": { "include": [ From 2c71ae758328cbc3b6deb3b1db12117691022ae8 Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 6 May 2016 16:30:48 -0700 Subject: [PATCH 111/291] React to deployer update --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index b8bb565b59..0b58ebb36a 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -75,7 +75,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 - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 52f2435317..9241e7b3fc 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -150,7 +150,7 @@ namespace ServerComparison.FunctionalTests EnvironmentName = "Responses", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - PublishTargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0", ApplicationType = applicationType }; From 14251d55a5635bc273f5f07e1ca98b6207f2dd5f Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 19 May 2016 08:40:00 -0700 Subject: [PATCH 112/291] Fix schema change warnings --- test/ServerComparison.TestSites.Standalone/project.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 45e5baba44..cf94123d64 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -10,11 +10,11 @@ "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*" }, - "compile": [ - "../ServerComparison.TestSites/Startup*.cs" - ], "buildOptions": { - "emitEntryPoint": true + "emitEntryPoint": true, + "compile": { + "include": "../ServerComparison.TestSites/Startup*.cs" + } }, "publishOptions": { "include": [ From ed687d08b6f5bdd6e7c5a082c31856fcd26dccec Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Fri, 20 May 2016 14:53:49 -0700 Subject: [PATCH 113/291] Downgrade Server.Testing version to 0.1 --- test/ServerComparison.FunctionalTests/project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 1b6a35d595..46a7e6b8f6 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -12,7 +12,7 @@ "testRunner": "xunit", "dependencies": { "dotnet-test-xunit": "1.0.0-*", - "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", + "Microsoft.AspNetCore.Server.Testing": "0.1.0-*", "Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*", From 2578110c23b0f9c4565e71523693db60be95183d Mon Sep 17 00:00:00 2001 From: Cesar Blum Silveira Date: Fri, 27 May 2016 11:51:45 -0700 Subject: [PATCH 114/291] Fix OSX build on Travis. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b26ae5ea26..bd88113110 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ addons: packages: - libunwind8 before_install: - - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; fi + - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; brew install openssl; brew link --force openssl; fi install: - curl -sSL http://nginx.org/download/nginx-1.8.0.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.8.0/ - ./configure --prefix=$HOME/nginxinstall --with-http_ssl_module From a2a084fd16b8dee72e01af6b39090954c3bb93df Mon Sep 17 00:00:00 2001 From: Cesar Blum Silveira Date: Mon, 6 Jun 2016 20:18:10 -0700 Subject: [PATCH 115/291] Don't install nginx twice on OSX Travis build. --- .travis.yml | 7 +------ install-nginx.sh | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100755 install-nginx.sh diff --git a/.travis.yml b/.travis.yml index bd88113110..80d172a63e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,14 +6,9 @@ addons: packages: - libunwind8 before_install: - - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; brew install openssl; brew link --force openssl; fi + - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; brew install openssl; brew link --force openssl; else ./install-nginx.sh; fi install: - - curl -sSL http://nginx.org/download/nginx-1.8.0.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.8.0/ - - ./configure --prefix=$HOME/nginxinstall --with-http_ssl_module - - make - - make install - export PATH="$PATH:$HOME/nginxinstall/sbin/" - - cd $OLDPWD mono: - 4.0.5 os: diff --git a/install-nginx.sh b/install-nginx.sh new file mode 100755 index 0000000000..9564813c2d --- /dev/null +++ b/install-nginx.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +curl -sSL http://nginx.org/download/nginx-1.8.0.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.8.0/ +./configure --prefix=$HOME/nginxinstall --with-http_ssl_module +make +make install From f6bd2127c7ff97d90f02d2b8e7832f54b7ad7460 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Mon, 13 Jun 2016 15:29:22 -0700 Subject: [PATCH 116/291] Remove direct Microsoft.NETCore.Platforms dependency. - Microsoft.NETCore.App now pulls this package in. aspnet/Coherence-Signed#344 --- test/ServerComparison.FunctionalTests/project.json | 1 - 1 file changed, 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 46a7e6b8f6..cd1c02d7c2 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -16,7 +16,6 @@ "Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.0.0-*", - "Microsoft.NETCore.Platforms": "1.0.1-*" }, "publishOptions": { "include": [ From 3fc09ea482903a6e5d31043fd0861deefe6abd97 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 14 Jun 2016 16:22:48 -0700 Subject: [PATCH 117/291] Updating to release. --- NuGet.config | 2 +- build.ps1 | 2 +- build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NuGet.config b/NuGet.config index 52bf414192..71b9724a09 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + diff --git a/build.ps1 b/build.ps1 index 8f2f99691a..cf8bff13bb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/release.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index f4208100eb..f88fe4052e 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/release.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi From 2e63348580271985491eeaf23ed465346db2e2f6 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 16 Jun 2016 10:18:36 -0700 Subject: [PATCH 118/291] Updating to dev versions --- .../project.json | 8 ++++---- .../project.json | 18 +++++++++--------- test/ServerComparison.TestSites/project.json | 18 +++++++++--------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index cd1c02d7c2..6dc0df84e0 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -12,10 +12,10 @@ "testRunner": "xunit", "dependencies": { "dotnet-test-xunit": "1.0.0-*", - "Microsoft.AspNetCore.Server.Testing": "0.1.0-*", - "Microsoft.Extensions.Logging": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.0.0-*", + "Microsoft.AspNetCore.Server.Testing": "0.2.0-*", + "Microsoft.Extensions.Logging": "1.1.0-*", + "Microsoft.Extensions.Logging.Console": "1.1.0-*", + "Microsoft.Net.Http.Headers": "1.1.0-*" }, "publishOptions": { "include": [ diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index cf94123d64..32c262102a 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -1,14 +1,14 @@ { - "version": "1.0.0-*", + "version": "1.1.0-*", "dependencies": { - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*", - "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*", - "Microsoft.Extensions.Configuration.Json": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.0.0-*" + "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", + "Microsoft.AspNetCore.Server.WebListener": "0.2.0-*", + "Microsoft.AspNetCore.WebUtilities": "1.1.0-*", + "Microsoft.Extensions.Configuration.CommandLine": "1.1.0-*", + "Microsoft.Extensions.Configuration.Json": "1.1.0-*", + "Microsoft.Extensions.Logging.Console": "1.1.0-*", + "Microsoft.Net.Http.Headers": "1.1.0-*" }, "buildOptions": { "emitEntryPoint": true, diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 206fe76efa..bd15837f7f 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,14 +1,14 @@ { - "version": "1.0.0-*", + "version": "1.1.0-*", "dependencies": { - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNetCore.Server.WebListener": "0.1.0-*", - "Microsoft.AspNetCore.WebUtilities": "1.0.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*", - "Microsoft.Extensions.Configuration.Json": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.0.0-*" + "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", + "Microsoft.AspNetCore.Server.WebListener": "0.2.0-*", + "Microsoft.AspNetCore.WebUtilities": "1.1.0-*", + "Microsoft.Extensions.Configuration.CommandLine": "1.1.0-*", + "Microsoft.Extensions.Configuration.Json": "1.1.0-*", + "Microsoft.Extensions.Logging.Console": "1.1.0-*", + "Microsoft.Net.Http.Headers": "1.1.0-*" }, "buildOptions": { "emitEntryPoint": true From b8422416f58895289645384bf9350ed68c5379cd Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Thu, 9 Jun 2016 11:35:25 -0700 Subject: [PATCH 119/291] Run tests on XPlat --- .../HelloWorldTest.cs | 5 ++--- test/ServerComparison.FunctionalTests/Helpers.cs | 4 ++-- .../NtlmAuthenticationTest.cs | 1 - .../ResponseTests.cs | 1 - test/ServerComparison.FunctionalTests/nginx.conf | 3 +++ .../ServerComparison.FunctionalTests/project.json | 15 +++++++++++---- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index cd79ed3b52..69bb997fac 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.IO; using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.Testing; @@ -25,14 +24,14 @@ namespace ServerComparison.FunctionalTests //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/", ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/", ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5065/", ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/", ApplicationType.Portable)] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); } [Theory] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5066/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5067/", ApplicationType.Portable)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5067/", ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/", ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5069/", ApplicationType.Standalone)] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 5410e11c6f..acb4240bf1 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -10,8 +10,8 @@ namespace ServerComparison.FunctionalTests { public static string GetApplicationPath(ApplicationType applicationType) { - return Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", - applicationType == ApplicationType.Standalone? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites")); + return Path.GetFullPath(Path.Combine("..", + applicationType == ApplicationType.Standalone? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites")); } public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index e89f30f7ad..e1d9ef859c 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.IO; using System.Net; using System.Net.Http; using System.Threading.Tasks; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 9241e7b3fc..ac19e8fe0b 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; diff --git a/test/ServerComparison.FunctionalTests/nginx.conf b/test/ServerComparison.FunctionalTests/nginx.conf index 8547cf500a..6a4d512f14 100644 --- a/test/ServerComparison.FunctionalTests/nginx.conf +++ b/test/ServerComparison.FunctionalTests/nginx.conf @@ -1,3 +1,4 @@ +error_log [errorlog]; user [user]; worker_processes 4; pid [pidFile]; @@ -18,6 +19,8 @@ http { ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; + access_log [accesslog]; + gzip on; gzip_disable "msie6"; diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 6dc0df84e0..1961db988f 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -25,10 +25,17 @@ ] }, "frameworks": { - "net451": { - "frameworkAssemblies": { - "System.Runtime": "" - } + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "version": "1.0.0-*", + "type": "platform" + } + }, + "imports": [ + "dnxcore50", + "portable-net451+win8" + ] } } } \ No newline at end of file From 5af281a6dd0282e2ead74729a7ca8fc15ee57ea7 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 22 Jun 2016 14:34:50 -0700 Subject: [PATCH 120/291] Added rhel and centos rids to project.json --- test/ServerComparison.TestSites.Standalone/project.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 32c262102a..73a5e7c914 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -47,6 +47,8 @@ "osx.10.10-x64": {}, "osx.10.11-x64": {}, "ubuntu.14.04-x64": {}, - "ubuntu.15.04-x64": {} + "ubuntu.15.04-x64": {}, + "centos.7-x64": {}, + "rhel.7.2-x64": {} } } \ No newline at end of file From 9263d63d2c87b65683edd8c0eb369932581cea1b Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Wed, 22 Jun 2016 15:20:09 -0700 Subject: [PATCH 121/291] Add net451 back so windows works and Unix skips net451 --- .../Helpers.cs | 21 +++++++++++++++++-- .../NtlmAuthenticationTest.cs | 3 +++ .../project.json | 2 ++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index acb4240bf1..d53c638144 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -1,8 +1,10 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.IO; using Microsoft.AspNetCore.Server.Testing; +using Microsoft.Extensions.PlatformAbstractions; namespace ServerComparison.FunctionalTests { @@ -10,8 +12,23 @@ namespace ServerComparison.FunctionalTests { public static string GetApplicationPath(ApplicationType applicationType) { - return Path.GetFullPath(Path.Combine("..", - applicationType == ApplicationType.Standalone? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites")); + var applicationBasePath = PlatformServices.Default.Application.ApplicationBasePath; + + var directoryInfo = new DirectoryInfo(applicationBasePath); + do + { + var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "ServerTests.sln")); + if (solutionFileInfo.Exists) + { + var projectName = applicationType == ApplicationType.Standalone ? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites"; + return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "test", projectName)); + } + + directoryInfo = directoryInfo.Parent; + } + while (directoryInfo.Parent != null); + + throw new Exception($"Solution root could not be found using {applicationBasePath}"); } public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index e1d9ef859c..169dd2d2fa 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,5 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if NET451 using System; using System.Net; @@ -132,3 +133,5 @@ namespace ServerComparison.FunctionalTests } } } + +#endif \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 1961db988f..3ed5c4bea1 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -15,6 +15,7 @@ "Microsoft.AspNetCore.Server.Testing": "0.2.0-*", "Microsoft.Extensions.Logging": "1.1.0-*", "Microsoft.Extensions.Logging.Console": "1.1.0-*", + "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", "Microsoft.Net.Http.Headers": "1.1.0-*" }, "publishOptions": { @@ -25,6 +26,7 @@ ] }, "frameworks": { + "net451": { }, "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { From b569ececda8c9082c48ee207fa7c25a97a6745fa Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 5 Jul 2016 22:22:24 -0700 Subject: [PATCH 122/291] Updating to RTM build of test runner --- test/ServerComparison.FunctionalTests/project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 3ed5c4bea1..4ef710d579 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -11,7 +11,7 @@ }, "testRunner": "xunit", "dependencies": { - "dotnet-test-xunit": "1.0.0-*", + "dotnet-test-xunit": "2.2.0-*", "Microsoft.AspNetCore.Server.Testing": "0.2.0-*", "Microsoft.Extensions.Logging": "1.1.0-*", "Microsoft.Extensions.Logging.Console": "1.1.0-*", From ecd36454bb1a5058c7b6a555ce6722504d4e550c Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Fri, 1 Jul 2016 12:22:52 -0700 Subject: [PATCH 123/291] Updating to RTM builds of xunit and Moq --- .../project.json | 9 +++----- .../project.json | 21 +++++++------------ test/ServerComparison.TestSites/project.json | 9 +------- 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 4ef710d579..08406b8e1e 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -16,7 +16,8 @@ "Microsoft.Extensions.Logging": "1.1.0-*", "Microsoft.Extensions.Logging.Console": "1.1.0-*", "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.1.0-*" + "Microsoft.Net.Http.Headers": "1.1.0-*", + "xunit": "2.2.0-*" }, "publishOptions": { "include": [ @@ -33,11 +34,7 @@ "version": "1.0.0-*", "type": "platform" } - }, - "imports": [ - "dnxcore50", - "portable-net451+win8" - ] + } } } } \ No newline at end of file diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 73a5e7c914..c0a256a2f7 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -8,7 +8,11 @@ "Microsoft.Extensions.Configuration.CommandLine": "1.1.0-*", "Microsoft.Extensions.Configuration.Json": "1.1.0-*", "Microsoft.Extensions.Logging.Console": "1.1.0-*", - "Microsoft.Net.Http.Headers": "1.1.0-*" + "Microsoft.Net.Http.Headers": "1.1.0-*", + "Microsoft.NETCore.App": { + "version": "1.0.0-*", + "type": "platform" + } }, "buildOptions": { "emitEntryPoint": true, @@ -22,21 +26,10 @@ ] }, "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": "1.0.0-*" - } - } + "netcoreapp1.0": {} }, "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } + "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-*" }, "scripts": { "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index bd15837f7f..5552ffb497 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -21,10 +21,6 @@ "frameworks": { "net451": {}, "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net451+win8" - ], "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.0-*", @@ -34,10 +30,7 @@ } }, "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-*", - "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" - } + "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-*" }, "scripts": { "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" From 4e0cbc1bbb32edf09c4fddd638c4130140e9e229 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Thu, 7 Jul 2016 12:42:32 -0700 Subject: [PATCH 124/291] One build to rule them all - well, at least VS and command-line builds will share output - part of aspnet/Coherence-Signed#277 --- .../ServerComparison.FunctionalTests.xproj | 4 ++-- .../ServerComparison.TestSites.Standalone.xproj | 8 ++------ .../ServerComparison.TestSites.xproj | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj index a53802bc22..61e890c093 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj @@ -7,8 +7,8 @@ a319acce-060b-4385-9534-9f2202f6180e - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ + .\obj + .\bin\ 2.0 diff --git a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj index 427962a094..1b7a85fc36 100644 --- a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj +++ b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj @@ -4,16 +4,12 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - a7c46df3-0a33-4919-a22c-1c8affadc0be - ServerComparison.TestSites.Standalone - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\ - v4.5.2 + .\obj + .\bin\ - 2.0 diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj index 18923dfc62..9ad0d6bf8b 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj @@ -7,8 +7,8 @@ 030225d8-4ee8-47e5-b692-2a96b3b51a38 - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\ + .\obj + .\bin\ 2.0 From 0d15c6275430bca0bc230eb0e2b5601e085411ff Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Tue, 2 Aug 2016 13:13:37 -0700 Subject: [PATCH 125/291] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 80d172a63e..f7f0d8a4c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ addons: packages: - libunwind8 before_install: - - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; brew install openssl; brew link --force openssl; else ./install-nginx.sh; fi + - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; else ./install-nginx.sh; fi install: - export PATH="$PATH:$HOME/nginxinstall/sbin/" mono: From a8bc80e6b29b7087fedaea9fa689413d9b15aff4 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 8 Aug 2016 09:50:32 -0700 Subject: [PATCH 126/291] React to WebListener AllowAnonymous API change. --- test/ServerComparison.TestSites.Standalone/Program.cs | 3 ++- test/ServerComparison.TestSites/Program.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs index 0500b08856..6c63b24ab6 100644 --- a/test/ServerComparison.TestSites.Standalone/Program.cs +++ b/test/ServerComparison.TestSites.Standalone/Program.cs @@ -33,8 +33,9 @@ namespace ServerComparison.TestSites.Standalone // modify the applicationHost.config to enable NTLM. builder.UseWebListener(options => { + options.Listener.AuthenticationManager.AllowAnonymous = true; options.Listener.AuthenticationManager.AuthenticationSchemes = - AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; + AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } else diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index f272541cb8..d85b138e76 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -33,8 +33,9 @@ namespace ServerComparison.TestSites // modify the applicationHost.config to enable NTLM. builder.UseWebListener(options => { + options.Listener.AuthenticationManager.AllowAnonymous = true; options.Listener.AuthenticationManager.AuthenticationSchemes = - AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | AuthenticationSchemes.AllowAnonymous; + AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } else From be5ecb7082a4e447d9b5bf34fe3ee951c19a89e1 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 9 Aug 2016 15:11:48 -0700 Subject: [PATCH 127/291] Switching to dotnet.myget.org feed --- NuGet.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NuGet.config b/NuGet.config index 52bf414192..0fd623ffdd 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + - + From 158b0150516d6a6003745955c269d0d30d44dac1 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 9 Aug 2016 15:25:59 -0700 Subject: [PATCH 128/291] Remove branch specific NuGet configs --- NuGet.master.config | 7 ------- NuGet.release.config | 7 ------- 2 files changed, 14 deletions(-) delete mode 100644 NuGet.master.config delete mode 100644 NuGet.release.config diff --git a/NuGet.master.config b/NuGet.master.config deleted file mode 100644 index e2edffce48..0000000000 --- a/NuGet.master.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/NuGet.release.config b/NuGet.release.config deleted file mode 100644 index 1978dc065a..0000000000 --- a/NuGet.release.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - From 735118bda5404157821624bcce1d0b2c5777676e Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 15 Aug 2016 16:19:57 -0700 Subject: [PATCH 129/291] Reacting to Microsoft.AspNetCore.Server.Testing rename --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- test/ServerComparison.FunctionalTests/Helpers.cs | 2 +- test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- test/ServerComparison.FunctionalTests/project.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 69bb997fac..1b57236b3e 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -4,7 +4,7 @@ using System; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.Testing; +using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; using Xunit; diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index d53c638144..84a3cefd69 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -3,7 +3,7 @@ using System; using System.IO; -using Microsoft.AspNetCore.Server.Testing; +using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.Extensions.PlatformAbstractions; namespace ServerComparison.FunctionalTests diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 169dd2d2fa..555a27d416 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -6,7 +6,7 @@ using System; using System.Net; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.Testing; +using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; using Xunit; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index ac19e8fe0b..d0d05fc993 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.Testing; +using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 08406b8e1e..87993270d4 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -12,7 +12,7 @@ "testRunner": "xunit", "dependencies": { "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Server.Testing": "0.2.0-*", + "Microsoft.AspNetCore.Server.IntegrationTesting": "0.2.0-*", "Microsoft.Extensions.Logging": "1.1.0-*", "Microsoft.Extensions.Logging.Console": "1.1.0-*", "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", From 7caf2518ff66927c8e6673927e908d5b1d530338 Mon Sep 17 00:00:00 2001 From: Chris R Date: Thu, 18 Aug 2016 13:57:54 -0700 Subject: [PATCH 130/291] React to WebListener settings API changes --- test/ServerComparison.TestSites.Standalone/Program.cs | 6 +++--- test/ServerComparison.TestSites/Program.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs index 6c63b24ab6..f8d42cb693 100644 --- a/test/ServerComparison.TestSites.Standalone/Program.cs +++ b/test/ServerComparison.TestSites.Standalone/Program.cs @@ -21,7 +21,7 @@ namespace ServerComparison.TestSites.Standalone .UseIISIntegration() .UseStartup("ServerComparison.TestSites.Standalone"); - // Switch beteween Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. + // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) { if (string.Equals(builder.GetSetting("environment") ?? @@ -33,8 +33,8 @@ namespace ServerComparison.TestSites.Standalone // modify the applicationHost.config to enable NTLM. builder.UseWebListener(options => { - options.Listener.AuthenticationManager.AllowAnonymous = true; - options.Listener.AuthenticationManager.AuthenticationSchemes = + options.ListenerSettings.Authentication.AllowAnonymous = true; + options.ListenerSettings.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index d85b138e76..ae990d9995 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -21,7 +21,7 @@ namespace ServerComparison.TestSites .UseIISIntegration() .UseStartup("ServerComparison.TestSites"); - // Switch beteween Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. + // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) { if (string.Equals(builder.GetSetting("environment") ?? @@ -33,8 +33,8 @@ namespace ServerComparison.TestSites // modify the applicationHost.config to enable NTLM. builder.UseWebListener(options => { - options.Listener.AuthenticationManager.AllowAnonymous = true; - options.Listener.AuthenticationManager.AuthenticationSchemes = + options.ListenerSettings.Authentication.AllowAnonymous = true; + options.ListenerSettings.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } From d7936af545979435486ac9d8994299bbbf745c35 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Sun, 4 Sep 2016 18:14:36 -0700 Subject: [PATCH 131/291] Increase .travis.yml consistency between repos - aspnet/Universe#349 - minimize `dotnet` setup time; no need for caching - install packages used in other repos; explicit and avoids issues as (Beta) Trusty image changes - just need one `brew install` command --- .travis.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f7f0d8a4c4..ed5fcf07e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,16 @@ dist: trusty addons: apt: packages: + - gettext + - libcurl4-openssl-dev + - libicu-dev + - libssl-dev - libunwind8 -before_install: - - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install nginx; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; else ./install-nginx.sh; fi -install: - - export PATH="$PATH:$HOME/nginxinstall/sbin/" + - zlib1g +env: + global: + - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + - DOTNET_CLI_TELEMETRY_OPTOUT: 1 mono: - 4.0.5 os: @@ -21,6 +26,9 @@ branches: - release - dev - /^(.*\/)?ci-.*$/ +before_install: + - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl nginx; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; else ./install-nginx.sh; fi +install: + - export PATH="$PATH:$HOME/nginxinstall/sbin/" script: - ./build.sh --quiet verify - From 16ee36c20a05c6ba7656afb9e5b0bcabdd0d56e8 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 8 Sep 2016 16:19:56 -0700 Subject: [PATCH 132/291] Downgrade dotnet-publish-iis to latest stable release --- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index c0a256a2f7..5cdfe51faf 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -29,7 +29,7 @@ "netcoreapp1.0": {} }, "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-*" + "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" }, "scripts": { "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 5552ffb497..c0f75886b8 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -30,7 +30,7 @@ } }, "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-*" + "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" }, "scripts": { "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" From 64d9e0e73591685b10ffb14c1c5f8117e1e49d0f Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 19 Sep 2016 09:55:07 -0700 Subject: [PATCH 133/291] React to WebListener version change --- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 5cdfe51faf..6d8033ada7 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -3,7 +3,7 @@ "dependencies": { "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", - "Microsoft.AspNetCore.Server.WebListener": "0.2.0-*", + "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", "Microsoft.AspNetCore.WebUtilities": "1.1.0-*", "Microsoft.Extensions.Configuration.CommandLine": "1.1.0-*", "Microsoft.Extensions.Configuration.Json": "1.1.0-*", diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index c0f75886b8..3e68084d55 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -3,7 +3,7 @@ "dependencies": { "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", - "Microsoft.AspNetCore.Server.WebListener": "0.2.0-*", + "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", "Microsoft.AspNetCore.WebUtilities": "1.1.0-*", "Microsoft.Extensions.Configuration.CommandLine": "1.1.0-*", "Microsoft.Extensions.Configuration.Json": "1.1.0-*", From 6cf94c09491f53509abf2224d2761db89f0d0722 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 23 Sep 2016 10:51:16 -0700 Subject: [PATCH 134/291] List netcoreapp1.0 prior to net451 so that test discovery in VS works --- test/ServerComparison.FunctionalTests/project.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 87993270d4..85188a7dca 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -27,7 +27,6 @@ ] }, "frameworks": { - "net451": { }, "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { @@ -35,6 +34,7 @@ "type": "platform" } } - } + }, + "net451": { } } } \ No newline at end of file From 4875019cb0f8cb646ca80a0a3a345e4f1da7ac70 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 28 Sep 2016 11:52:24 -0700 Subject: [PATCH 135/291] Updating partner package versions --- test/ServerComparison.FunctionalTests/project.json | 4 ++-- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 85188a7dca..5d94093cff 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -30,11 +30,11 @@ "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { - "version": "1.0.0-*", + "version": "1.1.0-*", "type": "platform" } } }, - "net451": { } + "net451": {} } } \ No newline at end of file diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 6d8033ada7..44f9c8265c 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -10,7 +10,7 @@ "Microsoft.Extensions.Logging.Console": "1.1.0-*", "Microsoft.Net.Http.Headers": "1.1.0-*", "Microsoft.NETCore.App": { - "version": "1.0.0-*", + "version": "1.1.0-*", "type": "platform" } }, diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 3e68084d55..98eda87abf 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -23,7 +23,7 @@ "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { - "version": "1.0.0-*", + "version": "1.1.0-*", "type": "platform" } } From d054bbc2e8682c952649a22eb862a340a49d43d3 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Tue, 4 Oct 2016 17:03:04 -0700 Subject: [PATCH 136/291] Respond to new behavior for HTTP/1.1 Connection: close responses --- .../ResponseTests.cs | 54 ++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index d0d05fc993..fa9d63cc64 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -48,19 +48,37 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5086/", ApplicationType.Portable)] // https://github.com/aspnet/IISIntegration/issues/7 [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5087/", ApplicationType.Portable)] - public Task ResponseFormats_Windows_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + // 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, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp10ConnectionCloseAsync, applicationType); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5087/", 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, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp11ConnectionCloseAsync, applicationType); } [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp10ConnectionCloseAsync, applicationType); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp11ConnectionCloseAsync, applicationType); } [ConditionalTheory] @@ -201,11 +219,35 @@ namespace ServerComparison.FunctionalTests } } - private static async Task CheckConnectionCloseAsync(HttpClient client, ILogger logger) + private static async Task CheckHttp11ConnectionCloseAsync(HttpClient client, ILogger logger) { var response = await client.GetAsync("connectionclose"); var responseText = await response.Content.ReadAsStringAsync(); try + { + Assert.Equal("Connnection Close", responseText); + Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?"); + Assert.True(response.Headers.TransferEncodingChunked); + Assert.Null(GetContentLength(response)); + } + catch (XunitException) + { + logger.LogWarning(response.ToString()); + logger.LogWarning(responseText); + throw; + } + } + + private static async Task CheckHttp10ConnectionCloseAsync(HttpClient client, ILogger logger) + { + var requestMessage = new HttpRequestMessage(HttpMethod.Get, "connectionclose") + { + Version = new Version(1, 0) + }; + + var response = await client.SendAsync(requestMessage); + var responseText = await response.Content.ReadAsStringAsync(); + try { Assert.Equal("Connnection Close", responseText); Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?"); From 6f5baf033dfe83a3c9a2cc2b4822649f551ac75d Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 10 Oct 2016 11:38:52 -0700 Subject: [PATCH 137/291] Add ResponseCompression integration tests --- .../NoCompression.conf | 36 + .../NoCompression.config | 1021 +++++++++++++++++ .../ResponseCompressionTests.cs | 238 ++++ .../nginx.conf | 1 + .../project.json | 8 +- .../project.json | 1 + .../StartupResponseCompression.cs | 77 ++ test/ServerComparison.TestSites/project.json | 1 + 8 files changed, 1381 insertions(+), 2 deletions(-) create mode 100644 test/ServerComparison.FunctionalTests/NoCompression.conf create mode 100644 test/ServerComparison.FunctionalTests/NoCompression.config create mode 100644 test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs create mode 100644 test/ServerComparison.TestSites/StartupResponseCompression.cs diff --git a/test/ServerComparison.FunctionalTests/NoCompression.conf b/test/ServerComparison.FunctionalTests/NoCompression.conf new file mode 100644 index 0000000000..1fa5e2f1e7 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/NoCompression.conf @@ -0,0 +1,36 @@ +error_log [errorlog]; +user [user]; +worker_processes 4; +pid [pidFile]; + +events { + worker_connections 768; +} + +http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 10; + types_hash_max_size 2048; + + default_type application/octet-stream; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + + access_log [accesslog]; + + gzip off; + + server { + listen [listenPort]; + location / { + proxy_pass [redirectUri]; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + } +} diff --git a/test/ServerComparison.FunctionalTests/NoCompression.config b/test/ServerComparison.FunctionalTests/NoCompression.config new file mode 100644 index 0000000000..a5deeb6f72 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/NoCompression.config @@ -0,0 +1,1021 @@ + + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs new file mode 100644 index 0000000000..363d4858fc --- /dev/null +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -0,0 +1,238 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Server.IntegrationTesting; +using Microsoft.AspNetCore.Testing.xunit; +using Microsoft.Extensions.Logging; +using Microsoft.Net.Http.Headers; +using Xunit; +using Xunit.Sdk; + +namespace ServerComparison.FunctionalTests +{ + // Uses ports ranging 5100 - 5130. + public class ResponseCompressionTests + { + // NGinx's default min size is 20 bytes + private static readonly string HelloWorldBody = "Hello World;" + new string('a', 20); + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5100/", ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Portable)] + public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5102/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5105/", ApplicationType.Portable)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5106/", ApplicationType.Standalone)] + public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5107/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5108/", ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5109/", ApplicationType.Standalone)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5110/", ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: false); + } + + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5111/", ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5112/", ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: false); + } + + [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5113/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5114/", ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: false); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5115/", ApplicationType.Standalone)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5116/", ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: true); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5117/", ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5118/", ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: true); + } + + public async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario, ApplicationType applicationType, bool hostCompression) + { + var logger = new LoggerFactory() + .AddConsole() + .CreateLogger(string.Format("ResponseCompression:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); + + using (logger.BeginScope("ResponseCompressionTest")) + { + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) + { + ApplicationBaseUriHint = applicationBaseUrl, + EnvironmentName = "ResponseCompression", + ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, + hostCompression ? "http.config" : "NoCompression.config", + hostCompression ? "nginx.conf" : "NoCompression.conf"), + SiteName = "HttpTestSite", // This is configured in the Http.config + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0", + ApplicationType = applicationType + }; + + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + { + var deploymentResult = deployer.Deploy(); + var httpClientHandler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.None }; + Assert.True(httpClientHandler.SupportsAutomaticDecompression); + var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + + // Request to base address and check if various parts of the body are rendered & measure the cold startup time. + var response = await RetryHelper.RetryRequest(() => + { + return httpClient.GetAsync(string.Empty); + }, logger, deploymentResult.HostShutdownToken); + + var responseText = await response.Content.ReadAsStringAsync(); + try + { + Assert.Equal("Running", responseText); + } + catch (XunitException) + { + logger.LogWarning(response.ToString()); + logger.LogWarning(responseText); + throw; + } + + await scenario(httpClient, logger); + } + } + } + + private static async Task CheckNoCompressionAsync(HttpClient client, ILogger logger) + { + var request = new HttpRequestMessage(HttpMethod.Get, "NoAppCompression"); + request.Headers.AcceptEncoding.ParseAdd("gzip,deflate"); + var response = await client.SendAsync(request); + var responseText = await response.Content.ReadAsStringAsync(); + try + { + Assert.Equal(HelloWorldBody, responseText); + Assert.Equal(HelloWorldBody.Length.ToString(), GetContentLength(response)); + Assert.Equal(0, response.Content.Headers.ContentEncoding.Count); + } + catch (XunitException) + { + logger.LogWarning(response.ToString()); + logger.LogWarning(responseText); + throw; + } + } + + private static Task CheckHostCompressionAsync(HttpClient client, ILogger logger) + { + return CheckCompressionAsync(client, "NoAppCompression", logger); + } + + private static Task CheckAppCompressionAsync(HttpClient client, ILogger logger) + { + return CheckCompressionAsync(client, "AppCompression", logger); + } + + private static async Task CheckCompressionAsync(HttpClient client, string url, ILogger logger) + { + // Manage the compression manually because HttpClient removes the Content-Encoding header when decompressing. + var request = new HttpRequestMessage(HttpMethod.Get, url); + request.Headers.AcceptEncoding.ParseAdd("gzip,deflate"); + var response = await client.SendAsync(request); + var responseText = await response.Content.ReadAsStringAsync(); + try + { + responseText = await ReadCompressedAsStringAsync(response.Content); + Assert.Equal(HelloWorldBody, responseText); + Assert.Equal(1, response.Content.Headers.ContentEncoding.Count); + Assert.Equal("gzip", response.Content.Headers.ContentEncoding.First()); + } + catch (XunitException) + { + logger.LogWarning(response.ToString()); + logger.LogWarning(responseText); + throw; + } + } + + private static string GetContentLength(HttpResponseMessage response) + { + // Don't use response.Content.Headers.ContentLength, it will dynamically calculate the value if it can. + IEnumerable values; + return response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out values) ? values.FirstOrDefault() : null; + } + + private static async Task ReadCompressedAsStringAsync(HttpContent content) + { + using (var stream = await content.ReadAsStreamAsync()) + using (var compressStream = new GZipStream(stream, CompressionMode.Decompress)) + using (var reader = new StreamReader(compressStream)) + { + return await reader.ReadToEndAsync(); + } + } + } +} diff --git a/test/ServerComparison.FunctionalTests/nginx.conf b/test/ServerComparison.FunctionalTests/nginx.conf index 6a4d512f14..1f77013ccc 100644 --- a/test/ServerComparison.FunctionalTests/nginx.conf +++ b/test/ServerComparison.FunctionalTests/nginx.conf @@ -22,6 +22,7 @@ http { access_log [accesslog]; gzip on; + gzip_types text/plain; gzip_disable "msie6"; server { diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 5d94093cff..193d39b2d2 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -5,7 +5,9 @@ "include": [ "Http.config", "nginx.conf", - "NtlmAuthentication.config" + "NtlmAuthentication.config", + "NoCompression.config", + "NoCompression.conf" ] } }, @@ -23,7 +25,9 @@ "include": [ "Http.config", "nginx.conf", - "NtlmAuthentication.config" + "NtlmAuthentication.config", + "NoCompression.config", + "NoCompression.conf" ] }, "frameworks": { diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 44f9c8265c..7568511658 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -1,6 +1,7 @@ { "version": "1.1.0-*", "dependencies": { + "Microsoft.AspNetCore.ResponseCompression": "0.1.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", diff --git a/test/ServerComparison.TestSites/StartupResponseCompression.cs b/test/ServerComparison.TestSites/StartupResponseCompression.cs new file mode 100644 index 0000000000..c73b67b437 --- /dev/null +++ b/test/ServerComparison.TestSites/StartupResponseCompression.cs @@ -0,0 +1,77 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +namespace ServerComparison.TestSites +{ + public class StartupResponseCompression + { + public void ConfigureServices(IServiceCollection services) + { + services.AddResponseCompression("text/plain"); + } + + public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) + { + loggerFactory.AddConsole(minLevel: LogLevel.Warning); + + // NGinx's default min size is 20 bytes + var helloWorldBody = "Hello World;" + new string('a', 20); + + app.Map("/NoAppCompression", subApp => + { + subApp.Run(context => + { + context.Response.ContentType = "text/plain"; + context.Response.ContentLength = helloWorldBody.Length; + return context.Response.WriteAsync(helloWorldBody); + }); + }); + + app.Map("/AppCompression", subApp => + { + subApp.UseResponseCompression(); + subApp.Run(context => + { + context.Response.ContentType = "text/plain"; + context.Response.ContentLength = helloWorldBody.Length; + return context.Response.WriteAsync(helloWorldBody); + }); + }); + /* If we implement DisableResponseBuffering on IISMiddleware + app.Map("/NoBuffer", subApp => + { + subApp.UseResponseCompression(); + subApp.Run(context => + { + context.Features.Get().DisableResponseBuffering(); + context.Response.ContentType = "text/plain"; + context.Response.ContentLength = helloWorldBody.Length; + return context.Response.WriteAsync(helloWorldBody); + }); + }); + */ + app.Run(context => + { + context.Response.ContentType = "text/plain"; + string body; + if (context.Request.Path.Value == "/") + { + body = "Running"; + } + else + { + body = "Not Implemented: " + context.Request.Path; + } + + context.Response.ContentLength = body.Length; + return context.Response.WriteAsync(body); + }); + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 98eda87abf..ff368cac84 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,6 +1,7 @@ { "version": "1.1.0-*", "dependencies": { + "Microsoft.AspNetCore.ResponseCompression": "0.1.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", From 052b6f1105c4e149078c6ddce4d521204eae5940 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 12 Oct 2016 13:46:37 -0700 Subject: [PATCH 138/291] Updating to netcoreapp1.1 --- test/ServerComparison.FunctionalTests/project.json | 2 +- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 193d39b2d2..fdcdc14a89 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -31,7 +31,7 @@ ] }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "version": "1.1.0-*", diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 7568511658..68b9c8a723 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -27,7 +27,7 @@ ] }, "frameworks": { - "netcoreapp1.0": {} + "netcoreapp1.1": {} }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index ff368cac84..2aa09beb3a 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -21,7 +21,7 @@ }, "frameworks": { "net451": {}, - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "version": "1.1.0-*", From f27925e0e457621c86b35c3116245ebeb6575b6c Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 12 Oct 2016 16:09:43 -0700 Subject: [PATCH 139/291] Revert "Updating to netcoreapp1.1" This reverts commit 052b6f1105c4e149078c6ddce4d521204eae5940. --- test/ServerComparison.FunctionalTests/project.json | 2 +- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index fdcdc14a89..193d39b2d2 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -31,7 +31,7 @@ ] }, "frameworks": { - "netcoreapp1.1": { + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "version": "1.1.0-*", diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 68b9c8a723..7568511658 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -27,7 +27,7 @@ ] }, "frameworks": { - "netcoreapp1.1": {} + "netcoreapp1.0": {} }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 2aa09beb3a..ff368cac84 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -21,7 +21,7 @@ }, "frameworks": { "net451": {}, - "netcoreapp1.1": { + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "version": "1.1.0-*", From d2e1a51fa86ae6a4533463f7edba9fa990c6687d Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 13 Oct 2016 11:24:56 -0700 Subject: [PATCH 140/291] Updating to netcoreapp1.1 --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- .../ResponseCompressionTests.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- test/ServerComparison.FunctionalTests/project.json | 2 +- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 1b57236b3e..dc09870f60 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -74,7 +74,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 ? "net451" : "netcoreapp1.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 363d4858fc..6827bc19e0 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -132,7 +132,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 ? "net451" : "netcoreapp1.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index fa9d63cc64..5377fcafb6 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -167,7 +167,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 ? "net451" : "netcoreapp1.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 193d39b2d2..fdcdc14a89 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -31,7 +31,7 @@ ] }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "version": "1.1.0-*", diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 7568511658..68b9c8a723 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -27,7 +27,7 @@ ] }, "frameworks": { - "netcoreapp1.0": {} + "netcoreapp1.1": {} }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index ff368cac84..2aa09beb3a 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -21,7 +21,7 @@ }, "frameworks": { "net451": {}, - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "version": "1.1.0-*", From 2d1ea1a28ff98828f5e9f240cc82ec97ef3a381a Mon Sep 17 00:00:00 2001 From: Chris R Date: Fri, 14 Oct 2016 11:06:24 -0700 Subject: [PATCH 141/291] React to ResponseCompression API change --- test/ServerComparison.TestSites/StartupResponseCompression.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/StartupResponseCompression.cs b/test/ServerComparison.TestSites/StartupResponseCompression.cs index c73b67b437..54d0810a5d 100644 --- a/test/ServerComparison.TestSites/StartupResponseCompression.cs +++ b/test/ServerComparison.TestSites/StartupResponseCompression.cs @@ -13,7 +13,7 @@ namespace ServerComparison.TestSites { public void ConfigureServices(IServiceCollection services) { - services.AddResponseCompression("text/plain"); + services.AddResponseCompression(); } public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) From 4fa05512655667886be92f1a31806461bc96919f Mon Sep 17 00:00:00 2001 From: Chris R Date: Fri, 14 Oct 2016 11:36:38 -0700 Subject: [PATCH 142/291] React to ResponseCompression version change --- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 68b9c8a723..7cb196a519 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -1,7 +1,7 @@ { "version": "1.1.0-*", "dependencies": { - "Microsoft.AspNetCore.ResponseCompression": "0.1.0-*", + "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 2aa09beb3a..8913995718 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,7 +1,7 @@ { "version": "1.1.0-*", "dependencies": { - "Microsoft.AspNetCore.ResponseCompression": "0.1.0-*", + "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", From b38b4415dc00a8f4e4fac35f92b3f4fbd74313c2 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 17 Oct 2016 09:49:47 -0700 Subject: [PATCH 143/291] Branching for 1.1.0-preview1 --- NuGet.config | 4 ++-- build.ps1 | 2 +- build.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NuGet.config b/NuGet.config index 0fd623ffdd..ad973186eb 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + - + diff --git a/build.ps1 b/build.ps1 index 8f2f99691a..787f63ac02 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/1.1.0-preview1.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index f4208100eb..355c682856 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/1.1.0-preview1.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi From e8093d250e121cd9721cb9ad21c9b00ceb64d8fd Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 9 Nov 2016 11:33:26 -0800 Subject: [PATCH 144/291] Branching for 1.1.0 --- NuGet.config | 4 ++-- build.ps1 | 2 +- build.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NuGet.config b/NuGet.config index 0fd623ffdd..ad973186eb 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + - + diff --git a/build.ps1 b/build.ps1 index 8f2f99691a..24ca167cf6 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/1.1.0.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index f4208100eb..fea9ac64ad 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/1.1.0.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi From 52d4d0d709314fcf5ab1ee9ecca88948836b5825 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 9 Nov 2016 14:19:38 -0800 Subject: [PATCH 145/291] Updating versions to 1.2.0-* --- .../project.json | 6 +++--- .../project.json | 16 ++++++++-------- test/ServerComparison.TestSites/project.json | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index fdcdc14a89..dfffe729e2 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -15,10 +15,10 @@ "dependencies": { "dotnet-test-xunit": "2.2.0-*", "Microsoft.AspNetCore.Server.IntegrationTesting": "0.2.0-*", - "Microsoft.Extensions.Logging": "1.1.0-*", - "Microsoft.Extensions.Logging.Console": "1.1.0-*", + "Microsoft.Extensions.Logging": "1.2.0-*", + "Microsoft.Extensions.Logging.Console": "1.2.0-*", "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", - "Microsoft.Net.Http.Headers": "1.1.0-*", + "Microsoft.Net.Http.Headers": "1.2.0-*", "xunit": "2.2.0-*" }, "publishOptions": { diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 7cb196a519..de18228344 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -2,14 +2,14 @@ "version": "1.1.0-*", "dependencies": { "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", - "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", - "Microsoft.AspNetCore.WebUtilities": "1.1.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.1.0-*", - "Microsoft.Extensions.Configuration.Json": "1.1.0-*", - "Microsoft.Extensions.Logging.Console": "1.1.0-*", - "Microsoft.Net.Http.Headers": "1.1.0-*", + "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", + "Microsoft.AspNetCore.Server.WebListener": "1.2.0-*", + "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", + "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", + "Microsoft.Extensions.Configuration.Json": "1.2.0-*", + "Microsoft.Extensions.Logging.Console": "1.2.0-*", + "Microsoft.Net.Http.Headers": "1.2.0-*", "Microsoft.NETCore.App": { "version": "1.1.0-*", "type": "platform" diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 8913995718..7a804723a3 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -2,14 +2,14 @@ "version": "1.1.0-*", "dependencies": { "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", - "Microsoft.AspNetCore.Server.WebListener": "1.1.0-*", - "Microsoft.AspNetCore.WebUtilities": "1.1.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.1.0-*", - "Microsoft.Extensions.Configuration.Json": "1.1.0-*", - "Microsoft.Extensions.Logging.Console": "1.1.0-*", - "Microsoft.Net.Http.Headers": "1.1.0-*" + "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", + "Microsoft.AspNetCore.Server.WebListener": "1.2.0-*", + "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", + "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", + "Microsoft.Extensions.Configuration.Json": "1.2.0-*", + "Microsoft.Extensions.Logging.Console": "1.2.0-*", + "Microsoft.Net.Http.Headers": "1.2.0-*" }, "buildOptions": { "emitEntryPoint": true From 364db831f5b9b2531b552c8c46d2650cf75850fa Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 10 Nov 2016 08:36:53 -0800 Subject: [PATCH 146/291] Fix downgrade warning --- test/ServerComparison.FunctionalTests/project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index dfffe729e2..5adba0c8ed 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -17,7 +17,7 @@ "Microsoft.AspNetCore.Server.IntegrationTesting": "0.2.0-*", "Microsoft.Extensions.Logging": "1.2.0-*", "Microsoft.Extensions.Logging.Console": "1.2.0-*", - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*", + "Microsoft.Extensions.PlatformAbstractions": "1.2.0-*", "Microsoft.Net.Http.Headers": "1.2.0-*", "xunit": "2.2.0-*" }, From ce527b33c3e3a1818527c9873a2b5471cc74399f Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 18 Nov 2016 10:56:56 -0800 Subject: [PATCH 147/291] Clean tmp folder after unzipping KoreBuild --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index f4208100eb..4fd7ede788 100755 --- a/build.sh +++ b/build.sh @@ -38,7 +38,7 @@ if test ! -d $buildFolder; then chmod +x $buildFile # Cleanup - if test ! -d $tempFolder; then + if test -d $tempFolder; then rm -rf $tempFolder fi fi From e57ded038bf47998e1ce821153a085fea9a388b4 Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 22 Nov 2016 15:54:46 -0800 Subject: [PATCH 148/291] #46 Test support for bin deployed aspnetcore.dll --- ServerTests.sln | 1 + test/ServerComparison.FunctionalTests/Http.config | 2 +- test/ServerComparison.FunctionalTests/NoCompression.config | 2 +- .../NtlmAuthentication.config | 2 +- test/ServerComparison.FunctionalTests/project.json | 2 +- test/ServerComparison.TestSites.Standalone/project.json | 4 ++-- test/ServerComparison.TestSites/project.json | 1 + 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ServerTests.sln b/ServerTests.sln index 7ebd72856d..b36c058033 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -8,6 +8,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject global.json = global.json + NuGet.config = NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FA91F388-F4AF-4850-9D68-D4D128E6B1A6}" diff --git a/test/ServerComparison.FunctionalTests/Http.config b/test/ServerComparison.FunctionalTests/Http.config index 5ef47a0ae4..3668f762c8 100644 --- a/test/ServerComparison.FunctionalTests/Http.config +++ b/test/ServerComparison.FunctionalTests/Http.config @@ -253,7 +253,7 @@ - + diff --git a/test/ServerComparison.FunctionalTests/NoCompression.config b/test/ServerComparison.FunctionalTests/NoCompression.config index a5deeb6f72..a44a5f2a81 100644 --- a/test/ServerComparison.FunctionalTests/NoCompression.config +++ b/test/ServerComparison.FunctionalTests/NoCompression.config @@ -253,7 +253,7 @@ - + diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentication.config b/test/ServerComparison.FunctionalTests/NtlmAuthentication.config index f0f7436f6e..c35bcf3443 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthentication.config +++ b/test/ServerComparison.FunctionalTests/NtlmAuthentication.config @@ -253,7 +253,7 @@ - + diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 5adba0c8ed..eda2492d4b 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -14,7 +14,7 @@ "testRunner": "xunit", "dependencies": { "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Server.IntegrationTesting": "0.2.0-*", + "Microsoft.AspNetCore.Server.IntegrationTesting": "0.3.0-*", "Microsoft.Extensions.Logging": "1.2.0-*", "Microsoft.Extensions.Logging.Console": "1.2.0-*", "Microsoft.Extensions.PlatformAbstractions": "1.2.0-*", diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index de18228344..9fd125e915 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -1,6 +1,7 @@ { "version": "1.1.0-*", "dependencies": { + "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", @@ -11,8 +12,7 @@ "Microsoft.Extensions.Logging.Console": "1.2.0-*", "Microsoft.Net.Http.Headers": "1.2.0-*", "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" + "version": "1.1.0-*" } }, "buildOptions": { diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 7a804723a3..cdc87668b1 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -1,6 +1,7 @@ { "version": "1.1.0-*", "dependencies": { + "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", From a3a583b910a0006f3d73af5e5f00fd15bfc759a5 Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 23 Nov 2016 11:52:02 -0800 Subject: [PATCH 149/291] Add a runtimes section to fix win7 --- test/ServerComparison.FunctionalTests/project.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index eda2492d4b..600a03f8a8 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -40,5 +40,19 @@ } }, "net451": {} + }, + "runtimes": { + "win7-x86": {}, + "win7-x64": {}, + + "osx.10.10-x64": {}, + "osx.10.11-x64": {}, + + "ubuntu.14.04-x64": {}, + "ubuntu.14.10-x64": {}, + "ubuntu.15.04-x64": {}, + "ubuntu.16.04-x64": {}, + "centos.7-x64": {}, + "debian.8-x64": {} } } \ No newline at end of file From ed01704108dd0bd31f09ae03f6d9794354525033 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Wed, 23 Nov 2016 15:59:33 -0800 Subject: [PATCH 150/291] Pin global.json SDK to 1.0.0-preview2-1-003177. --- global.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index d9b4ed63ae..f45e8cc925 100644 --- a/global.json +++ b/global.json @@ -1,3 +1,8 @@ { - "projects": [ "src" ] -} + "projects": [ + "src" + ], + "sdk": { + "version": "1.0.0-preview2-1-003177" + } +} \ No newline at end of file From 6f0a68b29877a7083ac60e63caa3c5daa0f85206 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 8 Dec 2016 10:03:42 -0800 Subject: [PATCH 151/291] Update .travis.yml osx image to xcode7.3. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ed5fcf07e8..eab8f0ea5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ mono: os: - linux - osx -osx_image: xcode7.1 +osx_image: xcode7.3 branches: only: - master From 13edf7a27b2a0a38348be0b8c48b7c519e2f376e Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 5 Dec 2016 09:03:53 -0800 Subject: [PATCH 152/291] Updating to 4.4 CoreFx packages --- global.json | 2 +- test/ServerComparison.FunctionalTests/project.json | 4 +--- test/ServerComparison.TestSites.Standalone/project.json | 2 +- test/ServerComparison.TestSites/project.json | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/global.json b/global.json index f45e8cc925..0ad1995dd2 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "src" ], "sdk": { - "version": "1.0.0-preview2-1-003177" + "version": "1.0.0-preview2-1-003180" } } \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json index 600a03f8a8..86f841fc4e 100644 --- a/test/ServerComparison.FunctionalTests/project.json +++ b/test/ServerComparison.FunctionalTests/project.json @@ -34,7 +34,7 @@ "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { - "version": "1.1.0-*", + "version": "1.2.0-*", "type": "platform" } } @@ -44,10 +44,8 @@ "runtimes": { "win7-x86": {}, "win7-x64": {}, - "osx.10.10-x64": {}, "osx.10.11-x64": {}, - "ubuntu.14.04-x64": {}, "ubuntu.14.10-x64": {}, "ubuntu.15.04-x64": {}, diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 9fd125e915..3120dbd204 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -12,7 +12,7 @@ "Microsoft.Extensions.Logging.Console": "1.2.0-*", "Microsoft.Net.Http.Headers": "1.2.0-*", "Microsoft.NETCore.App": { - "version": "1.1.0-*" + "version": "1.2.0-*" } }, "buildOptions": { diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index cdc87668b1..54252f213a 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -25,7 +25,7 @@ "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { - "version": "1.1.0-*", + "version": "1.2.0-*", "type": "platform" } } From 91f5cb358db9dfbd8780d4faea9f973d6e22a5c4 Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 3 Jan 2017 16:27:28 -0800 Subject: [PATCH 153/291] React to WebListener rename --- .../Program.cs | 12 ++++++------ .../project.json | 2 +- test/ServerComparison.TestSites/Program.cs | 18 +++++++++--------- test/ServerComparison.TestSites/project.json | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs index f8d42cb693..bc5350dc78 100644 --- a/test/ServerComparison.TestSites.Standalone/Program.cs +++ b/test/ServerComparison.TestSites.Standalone/Program.cs @@ -3,8 +3,8 @@ using System; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Server.HttpSys; using Microsoft.Extensions.Configuration; -using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites.Standalone { @@ -22,7 +22,7 @@ namespace ServerComparison.TestSites.Standalone .UseStartup("ServerComparison.TestSites.Standalone"); // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. - if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) + if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.HttpSys", System.StringComparison.Ordinal)) { if (string.Equals(builder.GetSetting("environment") ?? Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), @@ -31,16 +31,16 @@ namespace ServerComparison.TestSites.Standalone // Set up NTLM authentication for WebListener as follows. // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or // modify the applicationHost.config to enable NTLM. - builder.UseWebListener(options => + builder.UseHttpSys(options => { - options.ListenerSettings.Authentication.AllowAnonymous = true; - options.ListenerSettings.Authentication.Schemes = + options.Authentication.AllowAnonymous = true; + options.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } else { - builder.UseWebListener(); + builder.UseHttpSys(); } } else diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 3120dbd204..7ac3cdf7f3 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -3,9 +3,9 @@ "dependencies": { "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", + "Microsoft.AspNetCore.Server.HttpSys": "1.2.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.AspNetCore.Server.WebListener": "1.2.0-*", "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", "Microsoft.Extensions.Configuration.Json": "1.2.0-*", diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index ae990d9995..150eaa872a 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -1,10 +1,10 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Net.Http.Server; using System; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Server.HttpSys; +using Microsoft.Extensions.Configuration; namespace ServerComparison.TestSites { @@ -22,25 +22,25 @@ namespace ServerComparison.TestSites .UseStartup("ServerComparison.TestSites"); // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. - if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) + if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.HttpSys", System.StringComparison.Ordinal)) { if (string.Equals(builder.GetSetting("environment") ?? Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), "NtlmAuthentication", System.StringComparison.Ordinal)) { - // Set up NTLM authentication for WebListener as follows. + // Set up NTLM authentication for HttpSys as follows. // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or // modify the applicationHost.config to enable NTLM. - builder.UseWebListener(options => + builder.UseHttpSys(options => { - options.ListenerSettings.Authentication.AllowAnonymous = true; - options.ListenerSettings.Authentication.Schemes = + options.Authentication.AllowAnonymous = true; + options.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } else { - builder.UseWebListener(); + builder.UseHttpSys(); } } else diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 54252f213a..89162eaab2 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -3,9 +3,9 @@ "dependencies": { "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", + "Microsoft.AspNetCore.Server.HttpSys": "1.2.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.AspNetCore.Server.WebListener": "1.2.0-*", "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", "Microsoft.Extensions.Configuration.Json": "1.2.0-*", From 0f27c30d9047eff9d3cae2236446bbbd61de6121 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 2 Feb 2017 10:32:27 -0800 Subject: [PATCH 154/291] Upgraded to VS 2017 RC --- NuGet.config | 3 +- ServerTests.sln | 14 ++--- build.ps1 | 2 +- build.sh | 2 +- build/common.props | 21 +++++++ global.json | 8 --- .../HelloWorldTest.cs | 6 +- .../NtlmAuthenticationTest.cs | 2 +- .../ResponseCompressionTests.cs | 18 +++--- .../ResponseTests.cs | 18 +++--- .../ServerComparison.FunctionalTests.csproj | 25 +++++++++ .../ServerComparison.FunctionalTests.xproj | 20 ------- .../project.json | 56 ------------------- .../.notest | 0 .../Properties/AssemblyInfo.cs | 19 ------- .../Properties/launchSettings.json | 22 ++++++++ ...rverComparison.TestSites.Standalone.csproj | 28 ++++++++++ ...erverComparison.TestSites.Standalone.xproj | 17 ------ .../project.json | 48 ---------------- test/ServerComparison.TestSites/.notest | 0 .../ServerComparison.TestSites.csproj | 29 ++++++++++ .../ServerComparison.TestSites.xproj | 18 ------ test/ServerComparison.TestSites/project.json | 40 ------------- version.props | 7 +++ 24 files changed, 163 insertions(+), 260 deletions(-) create mode 100644 build/common.props delete mode 100644 global.json create mode 100644 test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj delete mode 100644 test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj delete mode 100644 test/ServerComparison.FunctionalTests/project.json create mode 100644 test/ServerComparison.TestSites.Standalone/.notest delete mode 100644 test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs create mode 100644 test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json create mode 100644 test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj delete mode 100644 test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj delete mode 100644 test/ServerComparison.TestSites.Standalone/project.json create mode 100644 test/ServerComparison.TestSites/.notest create mode 100644 test/ServerComparison.TestSites/ServerComparison.TestSites.csproj delete mode 100644 test/ServerComparison.TestSites/ServerComparison.TestSites.xproj delete mode 100644 test/ServerComparison.TestSites/project.json create mode 100644 version.props diff --git a/NuGet.config b/NuGet.config index 0fd623ffdd..8e65695611 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,8 @@ - + + diff --git a/ServerTests.sln b/ServerTests.sln index b36c058033..7e1140fbe8 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,23 +1,19 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.26131.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5B0A1907-2525-4081-AE14-255D3CE65B62}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject - global.json = global.json NuGet.config = NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FA91F388-F4AF-4850-9D68-D4D128E6B1A6}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.FunctionalTests", "test\ServerComparison.FunctionalTests\ServerComparison.FunctionalTests.xproj", "{A319ACCE-060B-4385-9534-9F2202F6180E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.FunctionalTests", "test\ServerComparison.FunctionalTests\ServerComparison.FunctionalTests.csproj", "{A319ACCE-060B-4385-9534-9F2202F6180E}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.TestSites", "test\ServerComparison.TestSites\ServerComparison.TestSites.xproj", "{030225D8-4EE8-47E5-B692-2A96B3B51A38}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites", "test\ServerComparison.TestSites\ServerComparison.TestSites.csproj", "{030225D8-4EE8-47E5-B692-2A96B3B51A38}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ServerComparison.TestSites.Standalone", "test\ServerComparison.TestSites.Standalone\ServerComparison.TestSites.Standalone.xproj", "{A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites.Standalone", "test\ServerComparison.TestSites.Standalone\ServerComparison.TestSites.Standalone.csproj", "{A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/build.ps1 b/build.ps1 index 8f2f99691a..0605b59c01 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index 4fd7ede788..07997d6c83 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi diff --git a/build/common.props b/build/common.props new file mode 100644 index 0000000000..6403d34f6c --- /dev/null +++ b/build/common.props @@ -0,0 +1,21 @@ + + + + + Microsoft ASP.NET Core + https://github.com/aspnet/servertests + git + 1.2.0-* + 1.6.2-* + $(VersionSuffix)-$(BuildNumber) + + + + + + + + + + + diff --git a/global.json b/global.json deleted file mode 100644 index 0ad1995dd2..0000000000 --- a/global.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "projects": [ - "src" - ], - "sdk": { - "version": "1.0.0-preview2-1-003180" - } -} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index dc09870f60..0b953f49d1 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -23,7 +23,7 @@ namespace ServerComparison.FunctionalTests [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/", ApplicationType.Portable)] //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/", ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5065/", ApplicationType.Standalone)] + //[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5065/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/", ApplicationType.Portable)] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { @@ -33,7 +33,7 @@ namespace ServerComparison.FunctionalTests [Theory] //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5067/", ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5069/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5069/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); @@ -42,7 +42,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5070/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5071/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5071/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 555a27d416..becbc380ec 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -25,7 +25,7 @@ namespace ServerComparison.FunctionalTests // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/", ApplicationType.Portable)] // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/", ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5053/", ApplicationType.Standalone)] + //[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5053/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { var logger = new LoggerFactory() diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 6827bc19e0..ba56b5d8be 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -36,7 +36,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5102/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -45,7 +45,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -55,7 +55,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5105/", ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5106/", ApplicationType.Standalone)] + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5106/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -64,7 +64,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5107/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5108/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5108/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -73,7 +73,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5109/", ApplicationType.Standalone)] + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5109/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5110/", ApplicationType.Portable)] public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { @@ -82,7 +82,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5111/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5112/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5112/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: false); @@ -91,7 +91,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5113/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5114/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5114/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: false); @@ -100,7 +100,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5115/", ApplicationType.Standalone)] + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5115/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5116/", ApplicationType.Portable)] public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { @@ -110,7 +110,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5117/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5118/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5118/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: true); diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 5377fcafb6..0088f920e6 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -30,7 +30,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); @@ -39,7 +39,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5084/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); @@ -67,7 +67,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp10ConnectionCloseAsync, applicationType); @@ -75,7 +75,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp11ConnectionCloseAsync, applicationType); @@ -93,7 +93,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5092/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5093/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5093/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); @@ -102,7 +102,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5094/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5095/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5095/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); @@ -120,7 +120,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5098/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5099/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5099/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); @@ -129,7 +129,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5100/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Standalone)] + //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); @@ -147,7 +147,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync, applicationType); diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj new file mode 100644 index 0000000000..ce0552f163 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -0,0 +1,25 @@ + + + + + + netcoreapp1.1;net451 + win7-x64 + + + + + + + + + + + + + + + + + + diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj deleted file mode 100644 index 61e890c093..0000000000 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - a319acce-060b-4385-9534-9f2202f6180e - .\obj - .\bin\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/project.json b/test/ServerComparison.FunctionalTests/project.json deleted file mode 100644 index 86f841fc4e..0000000000 --- a/test/ServerComparison.FunctionalTests/project.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "buildOptions": { - "warningsAsErrors": true, - "copyToOutput": { - "include": [ - "Http.config", - "nginx.conf", - "NtlmAuthentication.config", - "NoCompression.config", - "NoCompression.conf" - ] - } - }, - "testRunner": "xunit", - "dependencies": { - "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Server.IntegrationTesting": "0.3.0-*", - "Microsoft.Extensions.Logging": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*", - "Microsoft.Extensions.PlatformAbstractions": "1.2.0-*", - "Microsoft.Net.Http.Headers": "1.2.0-*", - "xunit": "2.2.0-*" - }, - "publishOptions": { - "include": [ - "Http.config", - "nginx.conf", - "NtlmAuthentication.config", - "NoCompression.config", - "NoCompression.conf" - ] - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.2.0-*", - "type": "platform" - } - } - }, - "net451": {} - }, - "runtimes": { - "win7-x86": {}, - "win7-x64": {}, - "osx.10.10-x64": {}, - "osx.10.11-x64": {}, - "ubuntu.14.04-x64": {}, - "ubuntu.14.10-x64": {}, - "ubuntu.15.04-x64": {}, - "ubuntu.16.04-x64": {}, - "centos.7-x64": {}, - "debian.8-x64": {} - } -} \ No newline at end of file diff --git a/test/ServerComparison.TestSites.Standalone/.notest b/test/ServerComparison.TestSites.Standalone/.notest new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs b/test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs deleted file mode 100644 index e1e9c37584..0000000000 --- a/test/ServerComparison.TestSites.Standalone/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ServerComparison.TestSites.Standalone")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a7c46df3-0a33-4919-a22c-1c8affadc0be")] diff --git a/test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json b/test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json new file mode 100644 index 0000000000..259a358046 --- /dev/null +++ b/test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json @@ -0,0 +1,22 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:3417/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "ServerComparison.TestSites.Standalone": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj new file mode 100644 index 0000000000..c3b32744af --- /dev/null +++ b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj @@ -0,0 +1,28 @@ + + + + + + netcoreapp1.1 + Exe + + + + + + + + + + + + + + + + + + + + + diff --git a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj deleted file mode 100644 index 1b7a85fc36..0000000000 --- a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - a7c46df3-0a33-4919-a22c-1c8affadc0be - .\obj - .\bin\ - - - 2.0 - - - diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json deleted file mode 100644 index 7ac3cdf7f3..0000000000 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "version": "1.1.0-*", - "dependencies": { - "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", - "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", - "Microsoft.AspNetCore.Server.HttpSys": "1.2.0-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Configuration.Json": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*", - "Microsoft.Net.Http.Headers": "1.2.0-*", - "Microsoft.NETCore.App": { - "version": "1.2.0-*" - } - }, - "buildOptions": { - "emitEntryPoint": true, - "compile": { - "include": "../ServerComparison.TestSites/Startup*.cs" - } - }, - "publishOptions": { - "include": [ - "web.config" - ] - }, - "frameworks": { - "netcoreapp1.1": {} - }, - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - }, - "runtimes": { - "win7-x64": {}, - "win7-x86": {}, - "osx.10.10-x64": {}, - "osx.10.11-x64": {}, - "ubuntu.14.04-x64": {}, - "ubuntu.15.04-x64": {}, - "centos.7-x64": {}, - "rhel.7.2-x64": {} - } -} \ No newline at end of file diff --git a/test/ServerComparison.TestSites/.notest b/test/ServerComparison.TestSites/.notest new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj new file mode 100644 index 0000000000..bdb53c2df8 --- /dev/null +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -0,0 +1,29 @@ + + + + + + net451;netcoreapp1.1 + + win7-x64 + Exe + + + + + + + + + + + + + + + + + + + + diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj deleted file mode 100644 index 9ad0d6bf8b..0000000000 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 030225d8-4ee8-47e5-b692-2a96b3b51a38 - .\obj - .\bin\ - - - 2.0 - 49212 - - - \ No newline at end of file diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json deleted file mode 100644 index 89162eaab2..0000000000 --- a/test/ServerComparison.TestSites/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "1.1.0-*", - "dependencies": { - "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", - "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", - "Microsoft.AspNetCore.Server.HttpSys": "1.2.0-*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Configuration.Json": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*", - "Microsoft.Net.Http.Headers": "1.2.0-*" - }, - "buildOptions": { - "emitEntryPoint": true - }, - "publishOptions": { - "include": [ - "web.config" - ] - }, - "frameworks": { - "net451": {}, - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.2.0-*", - "type": "platform" - } - } - } - }, - "tools": { - "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" - }, - "scripts": { - "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" - } -} \ No newline at end of file diff --git a/version.props b/version.props new file mode 100644 index 0000000000..17fd5ac36d --- /dev/null +++ b/version.props @@ -0,0 +1,7 @@ + + + + 1.2.0 + preview1 + + From 1151cde469c79ac59fca77292da0e4c04b499ec4 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 9 Feb 2017 17:31:34 -0800 Subject: [PATCH 155/291] Delete makefile.shade --- makefile.shade | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 makefile.shade diff --git a/makefile.shade b/makefile.shade deleted file mode 100644 index 562494d144..0000000000 --- a/makefile.shade +++ /dev/null @@ -1,7 +0,0 @@ - -var VERSION='0.1' -var FULL_VERSION='0.1' -var AUTHORS='Microsoft Open Technologies, Inc.' - -use-standard-lifecycle -k-standard-goals From 0527786686a63afd193d9a896041161bcec388fe Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Tue, 14 Feb 2017 13:19:30 -0800 Subject: [PATCH 156/291] Bump test projects up to .NET 4.5.2 - aspnet/Testing#248 - xUnit no longer supports .NET 4.5.1 - build tests for desktop .NET only on Windows --- .../ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 2 +- .../ServerComparison.FunctionalTests.csproj | 3 ++- .../ServerComparison.TestSites.csproj | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index becbc380ec..888bc429c3 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NET451 +#if NET452 using System; using System.Net; diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index ce0552f163..da278f0e3f 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -3,7 +3,8 @@ - netcoreapp1.1;net451 + netcoreapp1.1;net452 + netcoreapp1.1 win7-x64 diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index bdb53c2df8..4ec1c2f3e7 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -3,7 +3,8 @@ - net451;netcoreapp1.1 + net452;netcoreapp1.1 + netcoreapp1.1 win7-x64 Exe From 2773777ed1983dc1d5eb5932eb4811b4ee618c7d Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Tue, 14 Feb 2017 18:17:28 -0800 Subject: [PATCH 157/291] Use .NET 4.5.2 target framework when deploying test sites - follow-up to 0527786 - sites are also built for .NET 4.5.2 in desktop runs --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- .../ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 3 ++- .../ResponseCompressionTests.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 0b953f49d1..db1ce60a49 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -74,7 +74,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 ? "net451" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net452" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 888bc429c3..3b19f5e1c6 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -40,7 +40,8 @@ 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 - ApplicationType = applicationType + ApplicationType = applicationType, + TargetFramework = "net452", }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index ba56b5d8be..cf1a2402cb 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -132,7 +132,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 ? "net451" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net452" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 0088f920e6..40b1a0a8ed 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -167,7 +167,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 ? "net451" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net452" : "netcoreapp1.1", ApplicationType = applicationType }; From ec73ffbdf686625a919d94027a70971476969751 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 14 Feb 2017 16:03:53 -0800 Subject: [PATCH 158/291] Downgrade to stable packages --- build/common.props | 3 +-- build/dependencies.props | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 build/dependencies.props diff --git a/build/common.props b/build/common.props index 6403d34f6c..41d7bf4b73 100644 --- a/build/common.props +++ b/build/common.props @@ -1,12 +1,11 @@ + Microsoft ASP.NET Core https://github.com/aspnet/servertests git - 1.2.0-* - 1.6.2-* $(VersionSuffix)-$(BuildNumber) diff --git a/build/dependencies.props b/build/dependencies.props new file mode 100644 index 0000000000..e704edaec0 --- /dev/null +++ b/build/dependencies.props @@ -0,0 +1,6 @@ + + + 1.6.1 + 4.3.0 + + From 226f7992a3b12d548a4dd9b4970457f968488882 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 16 Feb 2017 09:55:25 -0800 Subject: [PATCH 159/291] React to aspnet/Korebuild#160 --- build/repo.props | 6 ++++++ test/ServerComparison.TestSites.Standalone/.notest | 0 test/ServerComparison.TestSites/.notest | 0 3 files changed, 6 insertions(+) create mode 100644 build/repo.props delete mode 100644 test/ServerComparison.TestSites.Standalone/.notest delete mode 100644 test/ServerComparison.TestSites/.notest diff --git a/build/repo.props b/build/repo.props new file mode 100644 index 0000000000..4fc3f36356 --- /dev/null +++ b/build/repo.props @@ -0,0 +1,6 @@ + + + + + + diff --git a/test/ServerComparison.TestSites.Standalone/.notest b/test/ServerComparison.TestSites.Standalone/.notest deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/ServerComparison.TestSites/.notest b/test/ServerComparison.TestSites/.notest deleted file mode 100644 index e69de29bb2..0000000000 From 0d1eabaa00831c8e0eebb2bdd3faa24455708117 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 1 Mar 2017 18:14:13 -0800 Subject: [PATCH 160/291] Change korebuild branch and fix argument forwarding in bootstrapper --- build.ps1 | 16 ++++++++-------- build.sh | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build.ps1 b/build.ps1 index 0605b59c01..5bf0e2c113 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,6 @@ $ErrorActionPreference = "Stop" -function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) +function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) { while($true) { @@ -19,7 +19,7 @@ function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $ret Start-Sleep -Seconds 10 } - else + else { $exception = $_.Exception throw $exception @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP @@ -43,18 +43,18 @@ $buildFolder = ".build" $buildFile="$buildFolder\KoreBuild.ps1" if (!(Test-Path $buildFolder)) { - Write-Host "Downloading KoreBuild from $koreBuildZip" - + Write-Host "Downloading KoreBuild from $koreBuildZip" + $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid() New-Item -Path "$tempFolder" -Type directory | Out-Null $localZipFile="$tempFolder\korebuild.zip" - + DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6 Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) - + New-Item -Path "$buildFolder" -Type directory | Out-Null copy-item "$tempFolder\**\build\*" $buildFolder -Recurse @@ -64,4 +64,4 @@ if (!(Test-Path $buildFolder)) { } } -&"$buildFile" $args \ No newline at end of file +&"$buildFile" @args diff --git a/build.sh b/build.sh index 07997d6c83..b0bcadb579 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi @@ -12,12 +12,12 @@ buildFile="$buildFolder/KoreBuild.sh" if test ! -d $buildFolder; then echo "Downloading KoreBuild from $koreBuildZip" - - tempFolder="/tmp/KoreBuild-$(uuidgen)" + + tempFolder="/tmp/KoreBuild-$(uuidgen)" mkdir $tempFolder - + localZipFile="$tempFolder/korebuild.zip" - + retries=6 until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null) do @@ -29,18 +29,18 @@ if test ! -d $buildFolder; then echo "Waiting 10 seconds before retrying. Retries left: $retries" sleep 10s done - + unzip -q -d $tempFolder $localZipFile - + mkdir $buildFolder cp -r $tempFolder/**/build/** $buildFolder - + chmod +x $buildFile - + # Cleanup if test -d $tempFolder; then - rm -rf $tempFolder + rm -rf $tempFolder fi fi -$buildFile -r $repoFolder "$@" \ No newline at end of file +$buildFile -r $repoFolder "$@" From d2a85d2179d766f5cdecaa79e268bec0643e3c7b Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 1 Mar 2017 18:25:39 -0800 Subject: [PATCH 161/291] Update AppVeyor and Travis settings --- .travis.yml | 2 +- appveyor.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index eab8f0ea5e..9030a114ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,4 +31,4 @@ before_install: install: - export PATH="$PATH:$HOME/nginxinstall/sbin/" script: - - ./build.sh --quiet verify + - ./build.sh diff --git a/appveyor.yml b/appveyor.yml index b9a9bcd1e6..88ad7c2042 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ branches: - dev - /^(.*\/)?ci-.*$/ build_script: - - build.cmd verify + - ps: .\build.ps1 clone_depth: 1 test: off -deploy: off \ No newline at end of file +deploy: off From 50c8aefda513ca094ce416f209fcf01b27ef5c98 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Thu, 9 Mar 2017 11:24:01 -0800 Subject: [PATCH 162/291] Update .travis.yml (#58) --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9030a114ba..c00d1a1121 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,7 @@ env: global: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 -mono: - - 4.0.5 +mono: none os: - linux - osx From 5ff734bb71c0335068f79846731b3183bb1e1b87 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 9 Mar 2017 10:37:38 -0800 Subject: [PATCH 163/291] [Fixes #53] Enable skipped Standalone tests --- ServerTests.sln | 9 +-- .../HelloWorldTest.cs | 12 +++- .../Helpers.cs | 9 +-- .../NtlmAuthenticationTest.cs | 12 +++- .../ResponseCompressionTests.cs | 24 +++++--- .../ResponseTests.cs | 24 +++++--- .../ServerComparison.FunctionalTests.csproj | 7 ++- .../Program.cs | 57 ------------------- .../Properties/launchSettings.json | 22 ------- ...rverComparison.TestSites.Standalone.csproj | 28 --------- .../web.config | 9 --- .../ServerComparison.TestSites.csproj | 9 ++- 12 files changed, 64 insertions(+), 158 deletions(-) delete mode 100644 test/ServerComparison.TestSites.Standalone/Program.cs delete mode 100644 test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json delete mode 100644 test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj delete mode 100644 test/ServerComparison.TestSites.Standalone/web.config diff --git a/ServerTests.sln b/ServerTests.sln index 7e1140fbe8..2cc850dac2 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26131.1 +VisualStudioVersion = 15.0.26228.4 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject @@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.Functional EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites", "test\ServerComparison.TestSites\ServerComparison.TestSites.csproj", "{030225D8-4EE8-47E5-B692-2A96B3B51A38}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites.Standalone", "test\ServerComparison.TestSites.Standalone\ServerComparison.TestSites.Standalone.csproj", "{A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -29,10 +27,6 @@ Global {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Debug|Any CPU.Build.0 = Debug|Any CPU {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Release|Any CPU.ActiveCfg = Release|Any CPU {030225D8-4EE8-47E5-B692-2A96B3B51A38}.Release|Any CPU.Build.0 = Release|Any CPU - {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -40,6 +34,5 @@ Global GlobalSection(NestedProjects) = preSolution {A319ACCE-060B-4385-9534-9F2202F6180E} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} {030225D8-4EE8-47E5-B692-2A96B3B51A38} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} - {A7C46DF3-0A33-4919-A22C-1C8AFFADC0BE} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} EndGlobalSection EndGlobal diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index db1ce60a49..764b32ed0e 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -6,6 +6,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; +using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Xunit; using Xunit.Sdk; @@ -23,7 +24,7 @@ namespace ServerComparison.FunctionalTests [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/", ApplicationType.Portable)] //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/", ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/", ApplicationType.Portable)] - //[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5065/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5065/", ApplicationType.Standalone)] [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/", ApplicationType.Portable)] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { @@ -33,7 +34,7 @@ namespace ServerComparison.FunctionalTests [Theory] //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5067/", ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5069/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5069/", ApplicationType.Standalone)] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); @@ -42,7 +43,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5070/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5071/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5071/", ApplicationType.Standalone)] public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); @@ -78,6 +79,11 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; + if(applicationType == ApplicationType.Standalone) + { + deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); + } + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) { var deploymentResult = deployer.Deploy(); diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 84a3cefd69..aff2fb1b86 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -20,8 +20,7 @@ namespace ServerComparison.FunctionalTests var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "ServerTests.sln")); if (solutionFileInfo.Exists) { - var projectName = applicationType == ApplicationType.Standalone ? "ServerComparison.TestSites.Standalone" : "ServerComparison.TestSites"; - return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "test", projectName)); + return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "test", "ServerComparison.TestSites")); } directoryInfo = directoryInfo.Parent; @@ -33,14 +32,16 @@ namespace ServerComparison.FunctionalTests public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig) { + var applicationBasePath = PlatformServices.Default.Application.ApplicationBasePath; + string content = null; if (serverType == ServerType.IISExpress) { - content = File.ReadAllText(iisConfig); + content = File.ReadAllText(Path.Combine(applicationBasePath, iisConfig)); } else if (serverType == ServerType.Nginx) { - content = File.ReadAllText(nginxConfig); + content = File.ReadAllText(Path.Combine(applicationBasePath, nginxConfig)); } return content; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 3b19f5e1c6..a3ca9abe81 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -8,6 +8,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; +using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Xunit; using Xunit.Sdk; @@ -25,7 +26,7 @@ namespace ServerComparison.FunctionalTests // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/", ApplicationType.Portable)] // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/", ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/", ApplicationType.Portable)] - //[InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5053/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5053/", ApplicationType.Standalone)] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { var logger = new LoggerFactory() @@ -40,10 +41,15 @@ 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 - ApplicationType = applicationType, - TargetFramework = "net452", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net452" : "netcoreapp1.1", + ApplicationType = applicationType }; + if(applicationType == ApplicationType.Standalone) + { + deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); + } + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) { var deploymentResult = deployer.Deploy(); diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index cf1a2402cb..f1fcd86a70 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -11,6 +11,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; +using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; @@ -36,7 +37,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5102/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Standalone)] public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -45,7 +46,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -55,7 +56,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5105/", ApplicationType.Portable)] - //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5106/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5106/", ApplicationType.Standalone)] public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -64,7 +65,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5107/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5108/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5108/", ApplicationType.Standalone)] public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -73,7 +74,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5109/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5109/", ApplicationType.Standalone)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5110/", ApplicationType.Portable)] public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { @@ -82,7 +83,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5111/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5112/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5112/", ApplicationType.Standalone)] public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: false); @@ -91,7 +92,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5113/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5114/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5114/", ApplicationType.Standalone)] public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: false); @@ -100,7 +101,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5115/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5115/", ApplicationType.Standalone)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5116/", ApplicationType.Portable)] public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { @@ -110,7 +111,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5117/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5118/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5118/", ApplicationType.Standalone)] public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: true); @@ -136,6 +137,11 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; + if (applicationType == ApplicationType.Standalone) + { + deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); + } + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) { var deploymentResult = deployer.Deploy(); diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 40b1a0a8ed..0ef668f1e9 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -8,6 +8,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; +using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; @@ -30,7 +31,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/", ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); @@ -39,7 +40,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5084/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/", ApplicationType.Standalone)] public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); @@ -67,7 +68,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp10ConnectionCloseAsync, applicationType); @@ -75,7 +76,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp11ConnectionCloseAsync, applicationType); @@ -93,7 +94,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5092/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5093/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5093/", ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); @@ -102,7 +103,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5094/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5095/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5095/", ApplicationType.Standalone)] public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); @@ -120,7 +121,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5098/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5099/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5099/", ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); @@ -129,7 +130,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5100/", ApplicationType.Portable)] - //[InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Standalone)] public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); @@ -147,7 +148,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Portable)] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/53")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync, applicationType); @@ -171,6 +172,11 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; + if (applicationType == ApplicationType.Standalone) + { + deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); + } + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) { var deploymentResult = deployer.Deploy(); diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index da278f0e3f..a0b3cbcddf 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,4 +1,4 @@ - + @@ -18,9 +18,14 @@ + + + + + diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs deleted file mode 100644 index bc5350dc78..0000000000 --- a/test/ServerComparison.TestSites.Standalone/Program.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Server.HttpSys; -using Microsoft.Extensions.Configuration; - -namespace ServerComparison.TestSites.Standalone -{ - public static class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .Build(); - - var builder = new WebHostBuilder() - .UseConfiguration(config) - .UseIISIntegration() - .UseStartup("ServerComparison.TestSites.Standalone"); - - // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. - if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.HttpSys", System.StringComparison.Ordinal)) - { - if (string.Equals(builder.GetSetting("environment") ?? - Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), - "NtlmAuthentication", System.StringComparison.Ordinal)) - { - // Set up NTLM authentication for WebListener as follows. - // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or - // modify the applicationHost.config to enable NTLM. - builder.UseHttpSys(options => - { - options.Authentication.AllowAnonymous = true; - options.Authentication.Schemes = - AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; - }); - } - else - { - builder.UseHttpSys(); - } - } - else - { - builder.UseKestrel(); - } - - var host = builder.Build(); - - host.Run(); - } - } -} - diff --git a/test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json b/test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json deleted file mode 100644 index 259a358046..0000000000 --- a/test/ServerComparison.TestSites.Standalone/Properties/launchSettings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:3417/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "ServerComparison.TestSites.Standalone": { - "commandName": "Project" - } - } -} \ No newline at end of file diff --git a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj b/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj deleted file mode 100644 index c3b32744af..0000000000 --- a/test/ServerComparison.TestSites.Standalone/ServerComparison.TestSites.Standalone.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - netcoreapp1.1 - Exe - - - - - - - - - - - - - - - - - - - - - diff --git a/test/ServerComparison.TestSites.Standalone/web.config b/test/ServerComparison.TestSites.Standalone/web.config deleted file mode 100644 index 3379e820ea..0000000000 --- a/test/ServerComparison.TestSites.Standalone/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 4ec1c2f3e7..96a27f5b6a 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -1,17 +1,16 @@ - + net452;netcoreapp1.1 netcoreapp1.1 - - win7-x64 + win7-x86;win7-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.15.04-x64;centos.7-x64;rhel.7.2-x64 Exe - + @@ -26,5 +25,5 @@ - + From e07c451b2c14901c50b7bf863c19f5a23e42a4e5 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 9 Mar 2017 16:46:19 -0800 Subject: [PATCH 164/291] Adding win81 RIDs to match CI Servers' RIDs --- .../ServerComparison.TestSites.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 96a27f5b6a..55f0685b4c 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -5,7 +5,7 @@ net452;netcoreapp1.1 netcoreapp1.1 - win7-x86;win7-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.15.04-x64;centos.7-x64;rhel.7.2-x64 + win7-x86;win7-x64;win81-x86;win81-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.15.04-x64;centos.7-x64;rhel.7.2-x64 Exe From ecc596082ffd7a5ff1b60bd0b8dfe5ac3b6139f0 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 14 Mar 2017 13:41:32 -0700 Subject: [PATCH 165/291] Update appveyor and travis settings --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c00d1a1121..5123c93c23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,6 @@ mono: none os: - linux - osx -osx_image: xcode7.3 branches: only: - master From 3ec8b7623627136fc8995dae6a3375ab129d4790 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 15 Mar 2017 19:05:25 -0700 Subject: [PATCH 166/291] Consolidate dependency versions into one file and remove workarounds --- build/dependencies.props | 8 +++++- .../ServerComparison.FunctionalTests.csproj | 19 +++++++------- .../ServerComparison.TestSites.csproj | 25 ++++++++----------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e704edaec0..6978b45585 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,6 +1,12 @@ - 1.6.1 + 1.2.0-* + 1.0.0 + 0.3.0-* + 1.0.0-* 4.3.0 + 1.6.1 + 15.0.0 + 2.2.0 diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index a0b3cbcddf..286ba87724 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -5,7 +5,6 @@ netcoreapp1.1;net452 netcoreapp1.1 - win7-x64 @@ -13,15 +12,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 55f0685b4c..514bb30eab 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -6,24 +6,19 @@ net452;netcoreapp1.1 netcoreapp1.1 win7-x86;win7-x64;win81-x86;win81-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.15.04-x64;centos.7-x64;rhel.7.2-x64 - Exe - - - - - - - - - - - - - - + + + + + + + + + + From 1d61e9059f475a4177dd001d863d953e9e176b8e Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 15 Mar 2017 19:16:42 -0700 Subject: [PATCH 167/291] :arrow_up: update ResponseCompression to latest dev version --- build/dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index 6978b45585..df1b9bf541 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,7 +1,7 @@ 1.2.0-* - 1.0.0 + 1.1.0-* 0.3.0-* 1.0.0-* 4.3.0 From 379566c6a56dc69c894a23dee59ef878ab8f8c8f Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 21 Mar 2017 12:17:39 -0700 Subject: [PATCH 168/291] Update Travis to macOS Sierra [skip appveyor] --- .travis.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5123c93c23..8d9441898c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,6 @@ language: csharp -sudo: required +sudo: false dist: trusty -addons: - apt: - packages: - - gettext - - libcurl4-openssl-dev - - libicu-dev - - libssl-dev - - libunwind8 - - zlib1g env: global: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true @@ -18,6 +9,7 @@ mono: none os: - linux - osx +osx_image: xcode8.2 branches: only: - master From dbc012c713e51dbaef73c4b6581ac3a24455e302 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 21 Mar 2017 12:56:34 -0700 Subject: [PATCH 169/291] Switch off Travis container-based infrastructure --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d9441898c..dbf444ca98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,14 @@ language: csharp -sudo: false +sudo: required dist: trusty env: global: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 +addons: + apt: + packages: + - libunwind8 mono: none os: - linux From 6e1a53f1f51062f85935ebc0677ca55c105773d2 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 22 Mar 2017 19:21:49 -0700 Subject: [PATCH 170/291] Remove net451 as a cross-compile target --- .gitignore | 3 ++- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- .../NtlmAuthenticationTest.cs | 8 +++++--- .../ResponseCompressionTests.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- .../ServerComparison.FunctionalTests.csproj | 4 +++- .../ServerComparison.TestSites.csproj | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index df62d36cd8..a7760db659 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ nuget.exe project.lock.json /.vs/ .testPublish/ -.build/ \ No newline at end of file +.build/ +global.json diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 764b32ed0e..3e42bf4a7d 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -75,7 +75,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 ? "net452" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index a3ca9abe81..d1837766a9 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NET452 +#if NET46 using System; using System.Net; @@ -41,7 +41,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 ? "net452" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp1.1", ApplicationType = applicationType }; @@ -140,5 +140,7 @@ namespace ServerComparison.FunctionalTests } } } - +#elif NETCOREAPP1_1 +#else +#error target frameworks need to be updated #endif \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index f1fcd86a70..9510e7b9e6 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -133,7 +133,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 ? "net452" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 0ef668f1e9..d12d5d51ba 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -168,7 +168,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 ? "net452" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp1.1", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 286ba87724..09ccf8e8cb 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -3,8 +3,10 @@ - netcoreapp1.1;net452 + netcoreapp1.1;net46 netcoreapp1.1 + true + true diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 514bb30eab..d6bdc83dcb 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -3,7 +3,7 @@ - net452;netcoreapp1.1 + net46;netcoreapp1.1 netcoreapp1.1 win7-x86;win7-x64;win81-x86;win81-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.15.04-x64;centos.7-x64;rhel.7.2-x64 From 1b5beea57363519bb142a229997ce9d1ce60e397 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 23 Mar 2017 09:22:12 -0700 Subject: [PATCH 171/291] Temporarily skipping failing NTLM tests --- test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index d1837766a9..9292bfc334 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -18,7 +18,7 @@ namespace ServerComparison.FunctionalTests // Uses ports ranging 5050 - 5060. public class NtlmAuthenticationTests { - [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] + [ConditionalTheory(Skip="Failures to net46 conversion"), Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // TODO: https://github.com/aspnet/IISIntegration/issues/1 From 5491ec56fde496fee6a783dd4847b3d97bb4b448 Mon Sep 17 00:00:00 2001 From: Chris R Date: Thu, 23 Mar 2017 15:30:46 -0700 Subject: [PATCH 172/291] Revert "Temporarily skipping failing NTLM tests" This reverts commit 1b5beea57363519bb142a229997ce9d1ce60e397. --- test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 9292bfc334..d1837766a9 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -18,7 +18,7 @@ namespace ServerComparison.FunctionalTests // Uses ports ranging 5050 - 5060. public class NtlmAuthenticationTests { - [ConditionalTheory(Skip="Failures to net46 conversion"), Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] + [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // TODO: https://github.com/aspnet/IISIntegration/issues/1 From 095e45953f423f852c6f548df5459c72f4152c27 Mon Sep 17 00:00:00 2001 From: Chris R Date: Thu, 23 Mar 2017 16:21:32 -0700 Subject: [PATCH 173/291] Add System.Net.Http 4.3.1 dependency to work around HttpClient issues --- build/dependencies.props | 1 + .../ServerComparison.FunctionalTests.csproj | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index df1b9bf541..0ef3cb1e7c 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -6,6 +6,7 @@ 1.0.0-* 4.3.0 1.6.1 + 4.3.1 15.0.0 2.2.0 diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 09ccf8e8cb..c1bfce1090 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,4 +1,4 @@ - + @@ -21,6 +21,7 @@ + From 7228c15e28100edfe48050fd5367335a7674cb7d Mon Sep 17 00:00:00 2001 From: John Luo Date: Sat, 25 Mar 2017 21:53:59 -0700 Subject: [PATCH 174/291] Use FrameworkSkipCondition Instead of the removed SkipIfCurrentRuntimeIsCoreClr --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 3e42bf4a7d..d14460919f 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -53,7 +53,7 @@ namespace ServerComparison.FunctionalTests [SkipIfEnvironmentVariableNotEnabled("IIS_VARIATIONS_ENABLED")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [SkipIfCurrentRuntimeIsCoreClr] + [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5072/", ApplicationType.Portable)] //[InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5073/", ApplicationType.Portable)] public Task HelloWorld_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) From 79f93c0f4d8e36665735fe675eb461c71cbf4035 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 28 Mar 2017 09:59:02 -0700 Subject: [PATCH 175/291] Update appveyor image to VS 2017 --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 88ad7c2042..017b131ccb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,8 +6,13 @@ branches: - release - dev - /^(.*\/)?ci-.*$/ +environment: + global: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 build_script: - ps: .\build.ps1 clone_depth: 1 test: off deploy: off +os: Visual Studio 2017 From 1ae7d6dc39d06be061f1e899cf884bce56e66b29 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 28 Mar 2017 10:12:24 -0700 Subject: [PATCH 176/291] Update README.md [ci skip] --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a4eaf48f5b..355a989132 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ Server Tests -======== +============ -AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/pjthuqdls1quaifx/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnetci/ServerTests/branch/dev) +[![Travis build status](https://img.shields.io/travis/aspnet/ServerTests.svg?label=travis-ci&branch=dev&style=flat-square)](https://travis-ci.org/aspnet/ServerTests/branches) +[![AppVeyor build status](https://img.shields.io/appveyor/ci/aspnetci/ServerTests/dev.svg?label=appveyor&style=flat-square)](https://ci.appveyor.com/project/aspnetci/ServerTests/branch/dev) -Travis: [![Travis](https://travis-ci.org/aspnet/ServerTests.svg?branch=dev)](https://travis-ci.org/aspnet/ServerTests) - -This repo hosts Helios, WebListener and Kestrel tests. +This repo hosts [HttpSysServer](https://github.com/aspnet/HttpSysServer) and [Kestrel](https://github.com/aspnet/KestrelHttpServer) tests. This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo. From a2914ab48396f33fd4129499fbcfef11d295e425 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 28 Mar 2017 10:13:37 -0700 Subject: [PATCH 177/291] Replace console logger with ITestOutputHelper (#64) --- .../HelloWorldTest.cs | 15 ++++++++++++--- .../NtlmAuthenticationTest.cs | 16 +++++++++++++--- .../ResponseCompressionTests.cs | 13 +++++++++++-- .../ResponseTests.cs | 14 ++++++++++++-- .../ServerComparison.FunctionalTests.csproj | 2 +- 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index d14460919f..6321998800 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Xunit; +using Xunit.Abstractions; using Xunit.Sdk; namespace ServerComparison.FunctionalTests @@ -16,6 +17,13 @@ namespace ServerComparison.FunctionalTests // Uses ports ranging 5061 - 5069. public class HelloWorldTests { + private readonly ITestOutputHelper _output; + + public HelloWorldTests(ITestOutputHelper output) + { + _output = output; + } + // Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601 [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] @@ -63,10 +71,11 @@ namespace ServerComparison.FunctionalTests public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { + var loggerName = string.Format("HelloWorld:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); + Console.WriteLine("Running test for " + loggerName); var logger = new LoggerFactory() - .AddConsole() - .CreateLogger(string.Format("HelloWorld:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); - + .AddXunit(_output) + .CreateLogger(loggerName); using (logger.BeginScope("HelloWorldTest")) { var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index d1837766a9..757a81ddd4 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Xunit; +using Xunit.Abstractions; using Xunit.Sdk; namespace ServerComparison.FunctionalTests @@ -18,6 +19,13 @@ namespace ServerComparison.FunctionalTests // Uses ports ranging 5050 - 5060. public class NtlmAuthenticationTests { + private readonly ITestOutputHelper _output; + + public NtlmAuthenticationTests(ITestOutputHelper output) + { + _output = output; + } + [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] @@ -29,9 +37,11 @@ namespace ServerComparison.FunctionalTests [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5053/", ApplicationType.Standalone)] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) { + var loggerName = string.Format("Ntlm:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); + Console.WriteLine("Running test for " + loggerName); var logger = new LoggerFactory() - .AddConsole() - .CreateLogger(string.Format("Ntlm:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); + .AddXunit(_output) + .CreateLogger(loggerName); using (logger.BeginScope("NtlmAuthenticationTest")) { @@ -143,4 +153,4 @@ namespace ServerComparison.FunctionalTests #elif NETCOREAPP1_1 #else #error target frameworks need to be updated -#endif \ No newline at end of file +#endif diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 9510e7b9e6..765e39d5c4 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -15,6 +15,7 @@ using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; +using Xunit.Abstractions; using Xunit.Sdk; namespace ServerComparison.FunctionalTests @@ -24,6 +25,12 @@ namespace ServerComparison.FunctionalTests { // NGinx's default min size is 20 bytes private static readonly string HelloWorldBody = "Hello World;" + new string('a', 20); + private readonly ITestOutputHelper _output; + + public ResponseCompressionTests(ITestOutputHelper output) + { + _output = output; + } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] @@ -119,9 +126,11 @@ namespace ServerComparison.FunctionalTests public async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario, ApplicationType applicationType, bool hostCompression) { + var loggerName = string.Format("ResponseCompression:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); + Console.WriteLine("Running test for " + loggerName); var logger = new LoggerFactory() - .AddConsole() - .CreateLogger(string.Format("ResponseCompression:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); + .AddXunit(_output) + .CreateLogger(loggerName); using (logger.BeginScope("ResponseCompressionTest")) { diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index d12d5d51ba..4f7ee3a943 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -12,6 +12,7 @@ using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; +using Xunit.Abstractions; using Xunit.Sdk; namespace ServerComparison.FunctionalTests @@ -19,6 +20,13 @@ namespace ServerComparison.FunctionalTests // Uses ports ranging 5080 - 5099. public class ResponseTests { + private readonly ITestOutputHelper _output; + + public ResponseTests(ITestOutputHelper output) + { + _output = output; + } + [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] @@ -156,9 +164,11 @@ namespace ServerComparison.FunctionalTests public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario, ApplicationType applicationType) { + var loggerName = string.Format("ResponseFormats:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); + Console.WriteLine("Running test for " + loggerName); var logger = new LoggerFactory() - .AddConsole() - .CreateLogger(string.Format("ResponseFormats:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType)); + .AddXunit(_output) + .CreateLogger(loggerName); using (logger.BeginScope("ResponseFormatsTest")) { diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index c1bfce1090..06f4741289 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -17,7 +17,7 @@ - + From 1d1b25517039e6b6734cfa31dca21570bf7bc556 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 29 Mar 2017 11:30:37 -0700 Subject: [PATCH 178/291] Updating to 2.0.0 Internal.AspNetCore.Sdk --- build/common.props | 2 +- build/dependencies.props | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/common.props b/build/common.props index 41d7bf4b73..fba8cccf74 100644 --- a/build/common.props +++ b/build/common.props @@ -10,7 +10,7 @@ - + diff --git a/build/dependencies.props b/build/dependencies.props index 0ef3cb1e7c..9fa566a6b2 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,6 +1,7 @@ 1.2.0-* + 2.0.0-* 1.1.0-* 0.3.0-* 1.0.0-* @@ -10,4 +11,4 @@ 15.0.0 2.2.0 - + \ No newline at end of file From 9b598201ff4acf2b85d537ac704e6406707c76ec Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Fri, 31 Mar 2017 13:22:09 -0700 Subject: [PATCH 179/291] react to aspnet/Hosting#996 (#67) --- ServerTests.sln | 9 +- build/dependencies.props | 4 +- .../HelloWorldTest.cs | 75 ++++----- .../Http.config | 10 +- .../LoggingHandler.cs | 25 +++ .../NoCompression.config | 10 +- .../NtlmAuthenticationTest.cs | 45 ++++-- .../ResponseCompressionTests.cs | 110 ++++++------- .../ResponseTests.cs | 150 +++++++++--------- .../ServerComparison.FunctionalTests.csproj | 4 +- .../TestLoggingUtilities.cs | 47 ++++++ .../nginx.conf | 3 +- 12 files changed, 293 insertions(+), 199 deletions(-) create mode 100644 test/ServerComparison.FunctionalTests/LoggingHandler.cs create mode 100644 test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs diff --git a/ServerTests.sln b/ServerTests.sln index 2cc850dac2..f26151af6f 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26228.4 +VisualStudioVersion = 15.0.26228.10 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject @@ -13,6 +13,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.Functional EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites", "test\ServerComparison.TestSites\ServerComparison.TestSites.csproj", "{030225D8-4EE8-47E5-B692-2A96B3B51A38}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{55694E45-5EDE-46F8-80AA-797DE5F8C5C3}" + ProjectSection(SolutionItems) = preProject + build\common.props = build\common.props + build\dependencies.props = build\dependencies.props + build\repo.props = build\repo.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/build/dependencies.props b/build/dependencies.props index 9fa566a6b2..5d612ceb14 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,7 +3,7 @@ 1.2.0-* 2.0.0-* 1.1.0-* - 0.3.0-* + 0.4.0-* 1.0.0-* 4.3.0 1.6.1 @@ -11,4 +11,4 @@ 15.0.0 2.2.0 - \ No newline at end of file + diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 6321998800..d5724031af 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -1,8 +1,9 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Net.Http; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; @@ -14,7 +15,6 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - // Uses ports ranging 5061 - 5069. public class HelloWorldTests { private readonly ITestOutputHelper _output; @@ -28,59 +28,47 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5061/", ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/", ApplicationType.Portable)] - //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5063/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5065/", ApplicationType.Standalone)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5066/", ApplicationType.Portable)] - public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] + [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, applicationBaseUrl, applicationType); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } [Theory] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5067/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5068/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5069/", ApplicationType.Standalone)] - public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5070/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5071/", ApplicationType.Standalone)] - public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } - [ConditionalTheory] - [SkipIfEnvironmentVariableNotEnabled("IIS_VARIATIONS_ENABLED")] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] - [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5072/", ApplicationType.Portable)] - //[InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5073/", ApplicationType.Portable)] - public Task HelloWorld_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationBaseUrl, applicationType); - } + testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); + var logger = loggerFactory.CreateLogger("TestHarness"); + Console.WriteLine($"Starting test: {testName}"); + logger.LogInformation("Starting test: {testName}", testName); - public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) - { - var loggerName = string.Format("HelloWorld:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); - Console.WriteLine("Running test for " + loggerName); - var logger = new LoggerFactory() - .AddXunit(_output) - .CreateLogger(loggerName); - using (logger.BeginScope("HelloWorldTest")) + using (logger.BeginScope("HelloWorld")) { var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { - ApplicationBaseUriHint = applicationBaseUrl, 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 @@ -88,16 +76,16 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; - if(applicationType == ApplicationType.Standalone) + if (applicationType == ApplicationType.Standalone) { deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { - var deploymentResult = deployer.Deploy(); + var deploymentResult = await deployer.DeployAsync(); var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => @@ -118,6 +106,9 @@ namespace ServerComparison.FunctionalTests } } } + + Console.WriteLine($"Finished test: {testName}"); + logger.LogInformation("Finished test: {testName}", testName); } } } diff --git a/test/ServerComparison.FunctionalTests/Http.config b/test/ServerComparison.FunctionalTests/Http.config index 3668f762c8..8e8b3f2f9d 100644 --- a/test/ServerComparison.FunctionalTests/Http.config +++ b/test/ServerComparison.FunctionalTests/Http.config @@ -5,7 +5,7 @@ For schema documentation, see %IIS_BIN%\config\schema\IIS_schema.xml. - + Please make a backup of this file before making any changes to it. NOTE: The following environment variables are available to be used @@ -25,20 +25,20 @@ The section controls the registration of sections. Section is the basic unit of deployment, locking, searching and containment for configuration settings. - + Every section belongs to one section group. A section group is a container of logically-related sections. - + Sections cannot be nested. Section groups may be nested. - +
- + The recommended way to unlock sections is by using a location tag: diff --git a/test/ServerComparison.FunctionalTests/LoggingHandler.cs b/test/ServerComparison.FunctionalTests/LoggingHandler.cs new file mode 100644 index 0000000000..42027875e0 --- /dev/null +++ b/test/ServerComparison.FunctionalTests/LoggingHandler.cs @@ -0,0 +1,25 @@ +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; + +namespace ServerComparison.FunctionalTests +{ + internal class LoggingHandler : DelegatingHandler + { + private ILogger _logger; + + public LoggingHandler(ILoggerFactory loggerFactory, HttpMessageHandler innerHandler) : base(innerHandler) + { + _logger = loggerFactory.CreateLogger(); + } + + protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + _logger.LogDebug("Sending {method} {url}", request.Method, request.RequestUri); + var response = await base.SendAsync(request, cancellationToken); + _logger.LogDebug("Received {statusCode} {reasonPhrase} {url}", response.StatusCode, response.ReasonPhrase, request.RequestUri); + return response; + } + } +} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/NoCompression.config b/test/ServerComparison.FunctionalTests/NoCompression.config index a44a5f2a81..c9b9f970be 100644 --- a/test/ServerComparison.FunctionalTests/NoCompression.config +++ b/test/ServerComparison.FunctionalTests/NoCompression.config @@ -5,7 +5,7 @@ For schema documentation, see %IIS_BIN%\config\schema\IIS_schema.xml. - + Please make a backup of this file before making any changes to it. NOTE: The following environment variables are available to be used @@ -25,20 +25,20 @@ The section controls the registration of sections. Section is the basic unit of deployment, locking, searching and containment for configuration settings. - + Every section belongs to one section group. A section group is a container of logically-related sections. - + Sections cannot be nested. Section groups may be nested. - +
- + The recommended way to unlock sections is by using a location tag: diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 757a81ddd4..05e520434a 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -5,6 +5,7 @@ using System; using System.Net; using System.Net.Http; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; @@ -16,7 +17,6 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - // Uses ports ranging 5050 - 5060. public class NtlmAuthenticationTests { private readonly ITestOutputHelper _output; @@ -30,24 +30,23 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // TODO: https://github.com/aspnet/IISIntegration/issues/1 - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/", ApplicationType.Portable)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/", ApplicationType.Portable)] - // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5052/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5053/", ApplicationType.Standalone)] - public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] + // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - var loggerName = string.Format("Ntlm:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); - Console.WriteLine("Running test for " + loggerName); - var logger = new LoggerFactory() - .AddXunit(_output) - .CreateLogger(loggerName); + var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); + var logger = loggerFactory.CreateLogger("TestHarness"); + Console.WriteLine($"Starting test: {testName}"); + logger.LogInformation("Starting test: {testName}", testName); using (logger.BeginScope("NtlmAuthenticationTest")) { var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { - ApplicationBaseUriHint = applicationBaseUrl, 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 @@ -55,16 +54,16 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; - if(applicationType == ApplicationType.Standalone) + if (applicationType == ApplicationType.Standalone) { deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { - var deploymentResult = deployer.Deploy(); + var deploymentResult = await deployer.DeployAsync(); var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => @@ -77,16 +76,19 @@ namespace ServerComparison.FunctionalTests { Assert.Equal("Hello World", responseText); + logger.LogInformation("Testing /Anonymous"); response = await httpClient.GetAsync("/Anonymous"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Anonymous?True", responseText); + logger.LogInformation("Testing /Restricted"); response = await httpClient.GetAsync("/Restricted"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); + logger.LogInformation("Testing /RestrictedNTLM"); response = await httpClient.GetAsync("/RestrictedNTLM"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); @@ -102,26 +104,32 @@ namespace ServerComparison.FunctionalTests Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); } + logger.LogInformation("Testing /Forbidden"); response = await httpClient.GetAsync("/Forbidden"); Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); + logger.LogInformation("Enabling Default Credentials"); httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + logger.LogInformation("Testing /AutoForbid"); response = await httpClient.GetAsync("/AutoForbid"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); + logger.LogInformation("Testing /Restricted"); response = await httpClient.GetAsync("/Restricted"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal("Negotiate", responseText); + logger.LogInformation("Testing /RestrictedNegotiate"); response = await httpClient.GetAsync("/RestrictedNegotiate"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal("Negotiate", responseText); + logger.LogInformation("Testing /RestrictedNTLM"); if (serverType == ServerType.WebListener) { response = await httpClient.GetAsync("/RestrictedNTLM"); @@ -147,6 +155,9 @@ namespace ServerComparison.FunctionalTests } } } + + Console.WriteLine($"Finished test: {testName}"); + logger.LogInformation("Finished test: {testName}", testName); } } } diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 765e39d5c4..aca273bdaa 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -8,6 +8,7 @@ using System.IO.Compression; using System.Linq; using System.Net; using System.Net.Http; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; @@ -20,7 +21,6 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - // Uses ports ranging 5100 - 5130. public class ResponseCompressionTests { // NGinx's default min size is 20 bytes @@ -35,108 +35,107 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5100/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Portable)] - public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5102/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Standalone)] - public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5105/", ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5106/", ApplicationType.Standalone)] - public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5107/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5108/", ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5109/", ApplicationType.Standalone)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5110/", ApplicationType.Portable)] - public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5111/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5112/", ApplicationType.Standalone)] - public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5113/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5114/", ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHostCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5115/", ApplicationType.Standalone)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5116/", ApplicationType.Portable)] - public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5117/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5118/", ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckAppCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } - public async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario, ApplicationType applicationType, bool hostCompression) + public async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) { - var loggerName = string.Format("ResponseCompression:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); - Console.WriteLine("Running test for " + loggerName); - var logger = new LoggerFactory() - .AddXunit(_output) - .CreateLogger(loggerName); + testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); + var logger = loggerFactory.CreateLogger("TestHarness"); + Console.WriteLine($"Starting test: {testName}"); + logger.LogInformation("Starting test: {testName}", testName); - using (logger.BeginScope("ResponseCompressionTest")) + using (logger.BeginScope("ResponseCompression")) { var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { - ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "ResponseCompression", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, hostCompression ? "http.config" : "NoCompression.config", @@ -151,12 +150,12 @@ namespace ServerComparison.FunctionalTests deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { - var deploymentResult = deployer.Deploy(); + var deploymentResult = await deployer.DeployAsync(); var httpClientHandler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.None }; Assert.True(httpClientHandler.SupportsAutomaticDecompression); - var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => @@ -179,10 +178,14 @@ namespace ServerComparison.FunctionalTests await scenario(httpClient, logger); } } + + Console.WriteLine($"Finished test: {testName}"); + logger.LogInformation("Finished test: {testName}", testName); } private static async Task CheckNoCompressionAsync(HttpClient client, ILogger logger) { + logger.LogInformation("Testing /NoAppCompression"); var request = new HttpRequestMessage(HttpMethod.Get, "NoAppCompression"); request.Headers.AcceptEncoding.ParseAdd("gzip,deflate"); var response = await client.SendAsync(request); @@ -214,6 +217,7 @@ namespace ServerComparison.FunctionalTests private static async Task CheckCompressionAsync(HttpClient client, string url, ILogger logger) { // Manage the compression manually because HttpClient removes the Content-Encoding header when decompressing. + logger.LogInformation($"Testing /{url}"); var request = new HttpRequestMessage(HttpMethod.Get, url); request.Headers.AcceptEncoding.ParseAdd("gzip,deflate"); var response = await client.SendAsync(request); diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 4f7ee3a943..b69fc9ee69 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -1,10 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; @@ -17,7 +18,6 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - // Uses ports ranging 5080 - 5099. public class ResponseTests { private readonly ITestOutputHelper _output; @@ -30,151 +30,150 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5080/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5081/", ApplicationType.Portable)] - public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, applicationBaseUrl, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5082/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5083/", ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5084/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5085/", ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5087/", ApplicationType.Portable)] + [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, string applicationBaseUrl, ApplicationType applicationType) + public Task ResponseFormats_Windows_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp10ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5087/", ApplicationType.Portable)] // https://github.com/aspnet/WebListener/issues/259 + [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, string applicationBaseUrl, ApplicationType applicationType) + public Task ResponseFormats_Windows_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp10ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5088/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5089/", ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5090/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5091/", ApplicationType.Portable)] - public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, applicationBaseUrl, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5092/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5093/", ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5094/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5095/", ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5096/", ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5097/", ApplicationType.Portable)] - public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5098/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5099/", ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5100/", ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5101/", ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5102/", ApplicationType.Portable)] // https://github.com/aspnet/IISIntegration/issues/7 - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5103/", ApplicationType.Portable)] - public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + // [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, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5104/", ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckManuallyChunkedAndCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } - public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, Func scenario, ApplicationType applicationType) + public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) { - var loggerName = string.Format("ResponseFormats:{0}:{1}:{2}:{3}", serverType, runtimeFlavor, architecture, applicationType); - Console.WriteLine("Running test for " + loggerName); - var logger = new LoggerFactory() - .AddXunit(_output) - .CreateLogger(loggerName); + testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); + var logger = loggerFactory.CreateLogger("TestHarness"); + Console.WriteLine($"Starting test: {testName}"); + logger.LogInformation("Starting test: {testName}", testName); - using (logger.BeginScope("ResponseFormatsTest")) + using (logger.BeginScope("ResponseFormats")) { var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { - ApplicationBaseUriHint = applicationBaseUrl, EnvironmentName = "Responses", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config @@ -187,11 +186,11 @@ namespace ServerComparison.FunctionalTests deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger)) + using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { - var deploymentResult = deployer.Deploy(); + var deploymentResult = await deployer.DeployAsync(); var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => @@ -214,10 +213,14 @@ namespace ServerComparison.FunctionalTests await scenario(httpClient, logger); } } + + Console.WriteLine($"Finished test: {testName}"); + logger.LogInformation("Finished test: {testName}", testName); } private static async Task CheckContentLengthAsync(HttpClient client, ILogger logger) { + logger.LogInformation("Testing ContentLength"); var response = await client.GetAsync("contentlength"); var responseText = await response.Content.ReadAsStringAsync(); try @@ -237,6 +240,7 @@ namespace ServerComparison.FunctionalTests private static async Task CheckHttp11ConnectionCloseAsync(HttpClient client, ILogger logger) { + logger.LogInformation("Testing Http11ConnectionClose"); var response = await client.GetAsync("connectionclose"); var responseText = await response.Content.ReadAsStringAsync(); try @@ -256,6 +260,7 @@ namespace ServerComparison.FunctionalTests private static async Task CheckHttp10ConnectionCloseAsync(HttpClient client, ILogger logger) { + logger.LogInformation("Testing Http10ConnectionClose"); var requestMessage = new HttpRequestMessage(HttpMethod.Get, "connectionclose") { Version = new Version(1, 0) @@ -280,6 +285,7 @@ namespace ServerComparison.FunctionalTests private static async Task CheckChunkedAsync(HttpClient client, ILogger logger) { + logger.LogInformation("Testing Chunked"); var response = await client.GetAsync("chunked"); var responseText = await response.Content.ReadAsStringAsync(); try @@ -299,6 +305,7 @@ namespace ServerComparison.FunctionalTests private static async Task CheckManuallyChunkedAsync(HttpClient client, ILogger logger) { + logger.LogInformation("Testing ManuallyChunked"); var response = await client.GetAsync("manuallychunked"); var responseText = await response.Content.ReadAsStringAsync(); try @@ -318,6 +325,7 @@ namespace ServerComparison.FunctionalTests private static async Task CheckManuallyChunkedAndCloseAsync(HttpClient client, ILogger logger) { + logger.LogInformation("Testing ManuallyChunkedAndClose"); var response = await client.GetAsync("manuallychunkedandclose"); var responseText = await response.Content.ReadAsStringAsync(); try diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 06f4741289..acf0f66f57 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -15,13 +15,15 @@ - + + + diff --git a/test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs b/test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs new file mode 100644 index 0000000000..8196bb92fd --- /dev/null +++ b/test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs @@ -0,0 +1,47 @@ +using System; +using System.IO; +using System.Reflection; +using System.Runtime.CompilerServices; +using Microsoft.Extensions.Logging; +using Serilog; +using Xunit.Abstractions; + +namespace ServerComparison.FunctionalTests +{ + public static class TestLoggingUtilities + { + public static readonly string TestOutputRoot = Environment.GetEnvironmentVariable("ASPNETCORE_TEST_LOG_DIR"); + + public static ILoggerFactory SetUpLogging(ITestOutputHelper output, [CallerMemberName] string testName = null) + { + var loggerFactory = new LoggerFactory(); + loggerFactory.AddXunit(output, LogLevel.Debug); + + if (!string.IsNullOrEmpty(TestOutputRoot)) + { + var testClass = typeof(TTestClass).GetTypeInfo(); + var testOutputDir = Path.Combine(TestOutputRoot, testClass.Assembly.GetName().Name, testClass.FullName); + if (!Directory.Exists(testOutputDir)) + { + Directory.CreateDirectory(testOutputDir); + } + + var testOutputFile = Path.Combine(testOutputDir, $"{testName}.log"); + + if (File.Exists(testOutputFile)) + { + File.Delete(testOutputFile); + } + + var serilogger = new LoggerConfiguration() + .Enrich.FromLogContext() + .MinimumLevel.Verbose() + .WriteTo.File(testOutputFile, flushToDiskInterval: TimeSpan.FromSeconds(1)) + .CreateLogger(); + loggerFactory.AddSerilog(serilogger); + } + + return loggerFactory; + } + } +} diff --git a/test/ServerComparison.FunctionalTests/nginx.conf b/test/ServerComparison.FunctionalTests/nginx.conf index 1f77013ccc..f9b0bc85c9 100644 --- a/test/ServerComparison.FunctionalTests/nginx.conf +++ b/test/ServerComparison.FunctionalTests/nginx.conf @@ -1,5 +1,4 @@ -error_log [errorlog]; -user [user]; +error_log [errorlog]; worker_processes 4; pid [pidFile]; From c950e713c2fc83e50891b580f12a3d5e3376fe12 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 3 Apr 2017 21:41:12 -0700 Subject: [PATCH 180/291] Updating versions to 2.0.0-preview1 --- build/dependencies.props | 4 ++-- .../ServerComparison.FunctionalTests.csproj | 2 +- .../ServerComparison.TestSites.csproj | 2 +- version.props | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 5d612ceb14..1696d81087 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,11 +1,11 @@ - 1.2.0-* + 2.0.0-* 2.0.0-* - 1.1.0-* 0.4.0-* 1.0.0-* 4.3.0 + 1.1.0 1.6.1 4.3.1 15.0.0 diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index acf0f66f57..76d51b4341 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -19,7 +19,7 @@ - + diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index d6bdc83dcb..ff23ce8c05 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -10,7 +10,7 @@ - + diff --git a/version.props b/version.props index 17fd5ac36d..c7150e64f4 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ - 1.2.0 + 2.0.0 preview1 From 50299cbac61ec32f2406414ede7d704e7d906d51 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Thu, 6 Apr 2017 15:19:34 -0700 Subject: [PATCH 181/291] react to aspnet/Hosting#1005 (#68) --- ServerTests.sln | 2 +- .../HelloWorldTest.cs | 24 +++------- .../LoggingHandler.cs | 25 ---------- .../NtlmAuthenticationTest.cs | 28 ++++------- .../ResponseCompressionTests.cs | 21 +++------ .../ResponseTests.cs | 26 ++++------ .../TestLoggingUtilities.cs | 47 ------------------- 7 files changed, 33 insertions(+), 140 deletions(-) delete mode 100644 test/ServerComparison.FunctionalTests/LoggingHandler.cs delete mode 100644 test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs diff --git a/ServerTests.sln b/ServerTests.sln index f26151af6f..8f87a50c85 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26228.10 +VisualStudioVersion = 15.0.26403.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index d5724031af..5557e053e8 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -6,6 +6,7 @@ using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; +using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; @@ -15,13 +16,10 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - public class HelloWorldTests + public class HelloWorldTests : LoggedTest { - private readonly ITestOutputHelper _output; - - public HelloWorldTests(ITestOutputHelper output) + public HelloWorldTests(ITestOutputHelper output) : base(output) { - _output = output; } // Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601 @@ -60,13 +58,10 @@ namespace ServerComparison.FunctionalTests public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) { testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; - var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); - var logger = loggerFactory.CreateLogger("TestHarness"); - Console.WriteLine($"Starting test: {testName}"); - logger.LogInformation("Starting test: {testName}", testName); - - using (logger.BeginScope("HelloWorld")) + using (StartLog(out var loggerFactory, testName)) { + var logger = loggerFactory.CreateLogger("HelloWorld"); + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', @@ -84,13 +79,11 @@ namespace ServerComparison.FunctionalTests using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { var deploymentResult = await deployer.DeployAsync(); - var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => { - return httpClient.GetAsync(string.Empty); + return deploymentResult.HttpClient.GetAsync(string.Empty); }, logger, deploymentResult.HostShutdownToken); var responseText = await response.Content.ReadAsStringAsync(); @@ -106,9 +99,6 @@ namespace ServerComparison.FunctionalTests } } } - - Console.WriteLine($"Finished test: {testName}"); - logger.LogInformation("Finished test: {testName}", testName); } } } diff --git a/test/ServerComparison.FunctionalTests/LoggingHandler.cs b/test/ServerComparison.FunctionalTests/LoggingHandler.cs deleted file mode 100644 index 42027875e0..0000000000 --- a/test/ServerComparison.FunctionalTests/LoggingHandler.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; - -namespace ServerComparison.FunctionalTests -{ - internal class LoggingHandler : DelegatingHandler - { - private ILogger _logger; - - public LoggingHandler(ILoggerFactory loggerFactory, HttpMessageHandler innerHandler) : base(innerHandler) - { - _logger = loggerFactory.CreateLogger(); - } - - protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) - { - _logger.LogDebug("Sending {method} {url}", request.Method, request.RequestUri); - var response = await base.SendAsync(request, cancellationToken); - _logger.LogDebug("Received {statusCode} {reasonPhrase} {url}", response.StatusCode, response.ReasonPhrase, request.RequestUri); - return response; - } - } -} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 05e520434a..cd89e8b571 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -8,6 +8,7 @@ using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; +using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; @@ -17,13 +18,10 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - public class NtlmAuthenticationTests + public class NtlmAuthenticationTests : LoggedTest { - private readonly ITestOutputHelper _output; - - public NtlmAuthenticationTests(ITestOutputHelper output) + public NtlmAuthenticationTests(ITestOutputHelper output) : base(output) { - _output = output; } [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] @@ -38,13 +36,10 @@ namespace ServerComparison.FunctionalTests public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; - var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); - var logger = loggerFactory.CreateLogger("TestHarness"); - Console.WriteLine($"Starting test: {testName}"); - logger.LogInformation("Starting test: {testName}", testName); - - using (logger.BeginScope("NtlmAuthenticationTest")) + using (StartLog(out var loggerFactory, testName)) { + var logger = loggerFactory.CreateLogger("NtlmAuthenticationTest"); + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' @@ -62,8 +57,7 @@ namespace ServerComparison.FunctionalTests using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { var deploymentResult = await deployer.DeployAsync(); - var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = deploymentResult.HttpClient; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => @@ -109,8 +103,9 @@ namespace ServerComparison.FunctionalTests Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); logger.LogInformation("Enabling Default Credentials"); - httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true }; - httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + + // Change the http client to one that uses default credentials + httpClient = deploymentResult.CreateHttpClient(new HttpClientHandler() { UseDefaultCredentials = true }); logger.LogInformation("Testing /AutoForbid"); response = await httpClient.GetAsync("/AutoForbid"); @@ -155,9 +150,6 @@ namespace ServerComparison.FunctionalTests } } } - - Console.WriteLine($"Finished test: {testName}"); - logger.LogInformation("Finished test: {testName}", testName); } } } diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index aca273bdaa..b0d7d6cf6f 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -11,6 +11,7 @@ using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; +using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; @@ -21,15 +22,13 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - public class ResponseCompressionTests + public class ResponseCompressionTests : LoggedTest { // NGinx's default min size is 20 bytes private static readonly string HelloWorldBody = "Hello World;" + new string('a', 20); - private readonly ITestOutputHelper _output; - public ResponseCompressionTests(ITestOutputHelper output) + public ResponseCompressionTests(ITestOutputHelper output) : base(output) { - _output = output; } [ConditionalTheory] @@ -127,13 +126,10 @@ namespace ServerComparison.FunctionalTests public async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) { testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; - var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); - var logger = loggerFactory.CreateLogger("TestHarness"); - Console.WriteLine($"Starting test: {testName}"); - logger.LogInformation("Starting test: {testName}", testName); - - using (logger.BeginScope("ResponseCompression")) + using (StartLog(out var loggerFactory, testName)) { + var logger = loggerFactory.CreateLogger("ResponseCompression"); + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { EnvironmentName = "ResponseCompression", @@ -155,7 +151,7 @@ namespace ServerComparison.FunctionalTests var deploymentResult = await deployer.DeployAsync(); var httpClientHandler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.None }; Assert.True(httpClientHandler.SupportsAutomaticDecompression); - var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; + var httpClient = deploymentResult.CreateHttpClient(httpClientHandler); // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => @@ -178,9 +174,6 @@ namespace ServerComparison.FunctionalTests await scenario(httpClient, logger); } } - - Console.WriteLine($"Finished test: {testName}"); - logger.LogInformation("Finished test: {testName}", testName); } private static async Task CheckNoCompressionAsync(HttpClient client, ILogger logger) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index b69fc9ee69..7fd466a51f 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -8,6 +8,7 @@ using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; +using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; @@ -18,13 +19,10 @@ using Xunit.Sdk; namespace ServerComparison.FunctionalTests { - public class ResponseTests + public class ResponseTests : LoggedTest { - private readonly ITestOutputHelper _output; - - public ResponseTests(ITestOutputHelper output) + public ResponseTests(ITestOutputHelper output) : base(output) { - _output = output; } [ConditionalTheory] @@ -165,13 +163,10 @@ namespace ServerComparison.FunctionalTests public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) { testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; - var loggerFactory = TestLoggingUtilities.SetUpLogging(_output, testName); - var logger = loggerFactory.CreateLogger("TestHarness"); - Console.WriteLine($"Starting test: {testName}"); - logger.LogInformation("Starting test: {testName}", testName); - - using (logger.BeginScope("ResponseFormats")) + using (StartLog(out var loggerFactory, testName)) { + var logger = loggerFactory.CreateLogger("ResponseFormats"); + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { EnvironmentName = "Responses", @@ -189,13 +184,11 @@ namespace ServerComparison.FunctionalTests using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { var deploymentResult = await deployer.DeployAsync(); - var httpClientHandler = new HttpClientHandler(); - var httpClient = new HttpClient(new LoggingHandler(loggerFactory, httpClientHandler)) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) }; // Request to base address and check if various parts of the body are rendered & measure the cold startup time. var response = await RetryHelper.RetryRequest(() => { - return httpClient.GetAsync(string.Empty); + return deploymentResult.HttpClient.GetAsync(string.Empty); }, logger, deploymentResult.HostShutdownToken); var responseText = await response.Content.ReadAsStringAsync(); @@ -210,12 +203,9 @@ namespace ServerComparison.FunctionalTests throw; } - await scenario(httpClient, logger); + await scenario(deploymentResult.HttpClient, logger); } } - - Console.WriteLine($"Finished test: {testName}"); - logger.LogInformation("Finished test: {testName}", testName); } private static async Task CheckContentLengthAsync(HttpClient client, ILogger logger) diff --git a/test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs b/test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs deleted file mode 100644 index 8196bb92fd..0000000000 --- a/test/ServerComparison.FunctionalTests/TestLoggingUtilities.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Runtime.CompilerServices; -using Microsoft.Extensions.Logging; -using Serilog; -using Xunit.Abstractions; - -namespace ServerComparison.FunctionalTests -{ - public static class TestLoggingUtilities - { - public static readonly string TestOutputRoot = Environment.GetEnvironmentVariable("ASPNETCORE_TEST_LOG_DIR"); - - public static ILoggerFactory SetUpLogging(ITestOutputHelper output, [CallerMemberName] string testName = null) - { - var loggerFactory = new LoggerFactory(); - loggerFactory.AddXunit(output, LogLevel.Debug); - - if (!string.IsNullOrEmpty(TestOutputRoot)) - { - var testClass = typeof(TTestClass).GetTypeInfo(); - var testOutputDir = Path.Combine(TestOutputRoot, testClass.Assembly.GetName().Name, testClass.FullName); - if (!Directory.Exists(testOutputDir)) - { - Directory.CreateDirectory(testOutputDir); - } - - var testOutputFile = Path.Combine(testOutputDir, $"{testName}.log"); - - if (File.Exists(testOutputFile)) - { - File.Delete(testOutputFile); - } - - var serilogger = new LoggerConfiguration() - .Enrich.FromLogContext() - .MinimumLevel.Verbose() - .WriteTo.File(testOutputFile, flushToDiskInterval: TimeSpan.FromSeconds(1)) - .CreateLogger(); - loggerFactory.AddSerilog(serilogger); - } - - return loggerFactory; - } - } -} From 710864eff7154a3fa35a992ed0810554af310d02 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 12 Apr 2017 13:38:34 -0700 Subject: [PATCH 182/291] Skip NtlmAuthenticationTests.NtlmAuthentication test - Workaround for regression in `dotnet run` (https://github.com/dotnet/sdk/issues/1118) --- .../ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index cd89e8b571..3a3f037ae1 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -24,7 +24,8 @@ namespace ServerComparison.FunctionalTests { } - [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] + [ConditionalTheory(Skip = "https://github.com/aspnet/ServerTests/issues/70")] + [Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // TODO: https://github.com/aspnet/IISIntegration/issues/1 From 676f4ba3e475b899b0db2e0da54c7697c625f9ac Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 29 Mar 2017 01:37:59 -0700 Subject: [PATCH 183/291] Converted test projects to run on netcoreapp2.0 --- build/dependencies.props | 1 + test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- .../NtlmAuthenticationTest.cs | 4 ++-- .../ResponseCompressionTests.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- .../ServerComparison.FunctionalTests.csproj | 4 ++-- .../ServerComparison.TestSites.csproj | 4 ++-- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 1696d81087..a26483fbc1 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -7,6 +7,7 @@ 4.3.0 1.1.0 1.6.1 + 2.0.0-* 4.3.1 15.0.0 2.2.0 diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 5557e053e8..b07dc6c2b0 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -67,7 +67,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 ? "net46" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 3a3f037ae1..de627693a5 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -46,7 +46,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 ? "net46" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp2.0", ApplicationType = applicationType }; @@ -154,7 +154,7 @@ namespace ServerComparison.FunctionalTests } } } -#elif NETCOREAPP1_1 +#elif NETCOREAPP2_0 #else #error target frameworks need to be updated #endif diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index b0d7d6cf6f..d2f1749e4d 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -137,7 +137,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 ? "net46" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 7fd466a51f..29010579a5 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -172,7 +172,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 ? "net46" : "netcoreapp1.1", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 76d51b4341..804ce24d6c 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -3,8 +3,8 @@ - netcoreapp1.1;net46 - netcoreapp1.1 + netcoreapp2.0;net46 + netcoreapp2.0 true true diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index ff23ce8c05..fba993dc7d 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -3,8 +3,8 @@ - net46;netcoreapp1.1 - netcoreapp1.1 + net46;netcoreapp2.0 + netcoreapp2.0 win7-x86;win7-x64;win81-x86;win81-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.15.04-x64;centos.7-x64;rhel.7.2-x64 From 1d3747c071071dc269c0e0e987126cdefcea87a7 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 13 Apr 2017 12:58:15 -0700 Subject: [PATCH 184/291] Skipped standalone tests temporarily --- build/repo.props | 1 - .../HelloWorldTest.cs | 6 +++--- .../NtlmAuthenticationTest.cs | 2 +- .../ResponseCompressionTests.cs | 18 +++++++++--------- .../ResponseTests.cs | 18 +++++++++--------- .../ServerComparison.TestSites.csproj | 1 - 6 files changed, 22 insertions(+), 24 deletions(-) diff --git a/build/repo.props b/build/repo.props index 4fc3f36356..768f1e2acf 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,6 +1,5 @@ - diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index b07dc6c2b0..ec17140d7f 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -30,7 +30,7 @@ namespace ServerComparison.FunctionalTests [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -40,7 +40,7 @@ namespace ServerComparison.FunctionalTests [Theory] //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); @@ -49,7 +49,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index de627693a5..0dc1471b7d 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -33,7 +33,7 @@ namespace ServerComparison.FunctionalTests // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index d2f1749e4d..c06581ae64 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -43,7 +43,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -52,7 +52,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -62,7 +62,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -71,7 +71,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -80,7 +80,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -89,7 +89,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); @@ -98,7 +98,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); @@ -107,7 +107,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -117,7 +117,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 29010579a5..995b3fffd6 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -37,7 +37,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); @@ -46,7 +46,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); @@ -74,7 +74,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); @@ -82,7 +82,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); @@ -100,7 +100,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); @@ -109,7 +109,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); @@ -127,7 +127,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); @@ -136,7 +136,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); @@ -154,7 +154,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index fba993dc7d..4585a198ea 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -5,7 +5,6 @@ net46;netcoreapp2.0 netcoreapp2.0 - win7-x86;win7-x64;win81-x86;win81-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.15.04-x64;centos.7-x64;rhel.7.2-x64 From fb28efe4f8057770acd6cd0814768813ea3f6901 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 6 Apr 2017 15:07:24 -0700 Subject: [PATCH 185/291] Removed code supplying runtime identifier to deployers --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 5 ----- .../NtlmAuthenticationTest.cs | 5 ----- .../ResponseCompressionTests.cs | 5 ----- test/ServerComparison.FunctionalTests/ResponseTests.cs | 5 ----- 4 files changed, 20 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index ec17140d7f..adb90db539 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -71,11 +71,6 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; - if (applicationType == ApplicationType.Standalone) - { - deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); - } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { var deploymentResult = await deployer.DeployAsync(); diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 0dc1471b7d..1b149a5ded 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -50,11 +50,6 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; - if (applicationType == ApplicationType.Standalone) - { - deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); - } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { var deploymentResult = await deployer.DeployAsync(); diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index c06581ae64..b63bee169a 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -141,11 +141,6 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; - if (applicationType == ApplicationType.Standalone) - { - deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); - } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { var deploymentResult = await deployer.DeployAsync(); diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 995b3fffd6..ae81609e8a 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -176,11 +176,6 @@ namespace ServerComparison.FunctionalTests ApplicationType = applicationType }; - if (applicationType == ApplicationType.Standalone) - { - deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); - } - using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) { var deploymentResult = await deployer.DeployAsync(); From b52430674f1c99b8985b3e3da155a27dc959bfa7 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 13 Apr 2017 22:51:04 -0700 Subject: [PATCH 186/291] Unskipped standalone functional tests --- .../HelloWorldTest.cs | 6 +++--- .../NtlmAuthenticationTest.cs | 2 +- .../ResponseCompressionTests.cs | 18 +++++++++--------- .../ResponseTests.cs | 18 +++++++++--------- .../ServerComparison.TestSites.csproj | 1 + 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index adb90db539..6a1b3a0884 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -30,7 +30,7 @@ namespace ServerComparison.FunctionalTests [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] [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/73")] + [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) { @@ -40,7 +40,7 @@ namespace ServerComparison.FunctionalTests [Theory] //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); @@ -49,7 +49,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 1b149a5ded..9810c1b2b7 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -33,7 +33,7 @@ namespace ServerComparison.FunctionalTests // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] [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/73")] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index b63bee169a..80e9b6b52f 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -43,7 +43,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -52,7 +52,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); @@ -62,7 +62,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -71,7 +71,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -80,7 +80,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -89,7 +89,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); @@ -98,7 +98,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); @@ -107,7 +107,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -117,7 +117,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index ae81609e8a..90024e7056 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -37,7 +37,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); @@ -46,7 +46,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); @@ -74,7 +74,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); @@ -82,7 +82,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); @@ -100,7 +100,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); @@ -109,7 +109,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); @@ -127,7 +127,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); @@ -136,7 +136,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); @@ -154,7 +154,7 @@ namespace ServerComparison.FunctionalTests [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, Skip = "https://github.com/aspnet/ServerTests/issues/73")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 4585a198ea..9c077063bb 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -5,6 +5,7 @@ net46;netcoreapp2.0 netcoreapp2.0 + win7-x86;win7-x64;linux-x64;osx.10.12-x64 From bfeff186e3ba2123665f1eb21be435ab560f7b12 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Thu, 20 Apr 2017 09:31:03 -0700 Subject: [PATCH 187/291] react to removal of PlatformAbstractions (#75) --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 3 --- test/ServerComparison.FunctionalTests/Helpers.cs | 7 +++---- .../NtlmAuthenticationTest.cs | 3 +-- .../ResponseCompressionTests.cs | 1 - test/ServerComparison.FunctionalTests/ResponseTests.cs | 1 - .../ServerComparison.FunctionalTests.csproj | 2 -- 6 files changed, 4 insertions(+), 13 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 6a1b3a0884..6299d247e8 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -1,14 +1,11 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; -using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; -using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Xunit; using Xunit.Abstractions; diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index aff2fb1b86..68f9e62c08 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -1,10 +1,9 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; using Microsoft.AspNetCore.Server.IntegrationTesting; -using Microsoft.Extensions.PlatformAbstractions; namespace ServerComparison.FunctionalTests { @@ -12,7 +11,7 @@ namespace ServerComparison.FunctionalTests { public static string GetApplicationPath(ApplicationType applicationType) { - var applicationBasePath = PlatformServices.Default.Application.ApplicationBasePath; + var applicationBasePath = AppContext.BaseDirectory; var directoryInfo = new DirectoryInfo(applicationBasePath); do @@ -32,7 +31,7 @@ namespace ServerComparison.FunctionalTests public static string GetConfigContent(ServerType serverType, string iisConfig, string nginxConfig) { - var applicationBasePath = PlatformServices.Default.Application.ApplicationBasePath; + var applicationBasePath = AppContext.BaseDirectory; string content = null; if (serverType == ServerType.IISExpress) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 9810c1b2b7..ef16263ead 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #if NET46 @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; -using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Xunit; using Xunit.Abstractions; diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 80e9b6b52f..d8ed839d41 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -13,7 +13,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; -using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 90024e7056..c7ef711de7 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; -using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; using Xunit; diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 804ce24d6c..3f6c38c390 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -18,8 +18,6 @@ - - From 463612d3a6e9b81fa2bb94cdcef010eddbb0524a Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Mon, 24 Apr 2017 16:04:36 -0700 Subject: [PATCH 188/291] remove integration test logging (#76) now that logging.testing has it --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 4 ++-- .../NtlmAuthenticationTest.cs | 6 ++---- .../ResponseCompressionTests.cs | 4 ++-- test/ServerComparison.FunctionalTests/ResponseTests.cs | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 6299d247e8..cc92615c89 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -1,12 +1,12 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; -using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; using Xunit; using Xunit.Abstractions; using Xunit.Sdk; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index ef16263ead..9e653faef4 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,16 +1,14 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #if NET46 -using System; using System.Net; using System.Net.Http; -using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; -using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; using Xunit; using Xunit.Abstractions; using Xunit.Sdk; diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index d8ed839d41..57321caa42 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -11,9 +11,9 @@ using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; -using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; using Microsoft.Net.Http.Headers; using Xunit; using Xunit.Abstractions; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index c7ef711de7..cf2e388738 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -8,9 +8,9 @@ using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; -using Microsoft.AspNetCore.Server.IntegrationTesting.xunit; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; using Microsoft.Net.Http.Headers; using Xunit; using Xunit.Abstractions; From 691cd146ce06d122b1841575691703c503d9ab1d Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 25 Apr 2017 11:04:10 -0700 Subject: [PATCH 189/291] Use Bundled NETStandard.Library \ NETCoreApp versions instead of explicitly specifying one --- build/common.props | 2 +- build/dependencies.props | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build/common.props b/build/common.props index fba8cccf74..8cd6bbde65 100644 --- a/build/common.props +++ b/build/common.props @@ -14,7 +14,7 @@ - + diff --git a/build/dependencies.props b/build/dependencies.props index a26483fbc1..666f79978a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -6,8 +6,6 @@ 1.0.0-* 4.3.0 1.1.0 - 1.6.1 - 2.0.0-* 4.3.1 15.0.0 2.2.0 From c1dc4ed2150d6a1173ba7bb297ee3c6c4770dc22 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 25 Apr 2017 22:05:30 -0700 Subject: [PATCH 190/291] Branching for 2.0.0-preview1 --- NuGet.config | 2 +- build.ps1 | 2 +- build.sh | 2 +- build/dependencies.props | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NuGet.config b/NuGet.config index 8e65695611..fa4304af9c 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + diff --git a/build.ps1 b/build.ps1 index 5bf0e2c113..225b1fe450 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0-preview1.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index b0bcadb579..702b25c636 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0-preview1.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi diff --git a/build/dependencies.props b/build/dependencies.props index 666f79978a..ddf1557fa0 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,6 +1,6 @@ - 2.0.0-* + 2.0.0-preview1-* 2.0.0-* 0.4.0-* 1.0.0-* From 19e3b1afe6be3489758923880389d1ada3fdeff3 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 26 Apr 2017 07:13:37 -0700 Subject: [PATCH 191/291] Updating package version to preview2 --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index c7150e64f4..6af4f81de2 100644 --- a/version.props +++ b/version.props @@ -2,6 +2,6 @@ 2.0.0 - preview1 + preview2 From 85e0fc52fbbc28459548bd2e808db0f807559dc7 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Wed, 26 Apr 2017 15:38:16 -0700 Subject: [PATCH 192/291] React to Logging API changes (#77) --- test/ServerComparison.TestSites/Program.cs | 6 ++++++ test/ServerComparison.TestSites/StartupHelloWorld.cs | 2 -- .../ServerComparison.TestSites/StartupNtlmAuthentication.cs | 2 -- .../StartupResponseCompression.cs | 2 -- test/ServerComparison.TestSites/StartupResponses.cs | 2 -- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index 150eaa872a..25a79e0c3b 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -5,6 +5,7 @@ using System; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Server.HttpSys; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; namespace ServerComparison.TestSites { @@ -18,6 +19,11 @@ namespace ServerComparison.TestSites var builder = new WebHostBuilder() .UseConfiguration(config) + .ConfigureLogging((_, factory) => + { + factory.AddConsole(); + factory.AddFilter("Console", level => level >= LogLevel.Warning); + }) .UseIISIntegration() .UseStartup("ServerComparison.TestSites"); diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/test/ServerComparison.TestSites/StartupHelloWorld.cs index 0c387f1b59..f92b8d45c7 100644 --- a/test/ServerComparison.TestSites/StartupHelloWorld.cs +++ b/test/ServerComparison.TestSites/StartupHelloWorld.cs @@ -11,8 +11,6 @@ namespace ServerComparison.TestSites { public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { - loggerFactory.AddConsole(minLevel: LogLevel.Warning); - app.Run(ctx => { return ctx.Response.WriteAsync("Hello World"); diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 639c747e35..d35a434c50 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -12,8 +12,6 @@ namespace ServerComparison.TestSites { public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { - loggerFactory.AddConsole(minLevel: LogLevel.Warning); - app.Use(async (context, next) => { try diff --git a/test/ServerComparison.TestSites/StartupResponseCompression.cs b/test/ServerComparison.TestSites/StartupResponseCompression.cs index 54d0810a5d..4f5398fe4c 100644 --- a/test/ServerComparison.TestSites/StartupResponseCompression.cs +++ b/test/ServerComparison.TestSites/StartupResponseCompression.cs @@ -18,8 +18,6 @@ namespace ServerComparison.TestSites public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { - loggerFactory.AddConsole(minLevel: LogLevel.Warning); - // NGinx's default min size is 20 bytes var helloWorldBody = "Hello World;" + new string('a', 20); diff --git a/test/ServerComparison.TestSites/StartupResponses.cs b/test/ServerComparison.TestSites/StartupResponses.cs index ebce640b37..3fc22ee091 100644 --- a/test/ServerComparison.TestSites/StartupResponses.cs +++ b/test/ServerComparison.TestSites/StartupResponses.cs @@ -12,8 +12,6 @@ namespace ServerComparison.TestSites { public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { - loggerFactory.AddConsole(minLevel: LogLevel.Warning); - app.Map("/contentlength", subApp => { subApp.Run(context => From d1a8a15b8714b95b5423bc648ed90c81a1fa83f6 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 27 Apr 2017 10:59:58 -0700 Subject: [PATCH 193/291] Updated runtime identifiers --- .../ServerComparison.TestSites.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 9c077063bb..1717cdcc39 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -5,7 +5,7 @@ net46;netcoreapp2.0 netcoreapp2.0 - win7-x86;win7-x64;linux-x64;osx.10.12-x64 + win-x86;win-x64;linux-x64;osx-x64 From 547e415ca42137116cf26bf24b648bdf00c6156d Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Thu, 27 Apr 2017 12:28:30 -0700 Subject: [PATCH 194/291] Changing the RID back from win-x64 to win7-x64 to workaround SQL issue --- .../ServerComparison.TestSites.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 1717cdcc39..e65266a974 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -5,7 +5,7 @@ net46;netcoreapp2.0 netcoreapp2.0 - win-x86;win-x64;linux-x64;osx-x64 + win7-x86;win7-x64;linux-x64;osx-x64 From 5a9dec3636422755d9cf19a10d5ad09f06457981 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 28 Apr 2017 21:45:43 -0700 Subject: [PATCH 195/291] Revert "Skip NtlmAuthenticationTests.NtlmAuthentication test" (#79) This reverts commit 710864eff7154a3fa35a992ed0810554af310d02. --- .../ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 9e653faef4..e6904ca523 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -21,8 +21,7 @@ namespace ServerComparison.FunctionalTests { } - [ConditionalTheory(Skip = "https://github.com/aspnet/ServerTests/issues/70")] - [Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] + [ConditionalTheory, Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] // TODO: https://github.com/aspnet/IISIntegration/issues/1 From 13df2a88779cb60dc7c21b42006c67811a5cffe4 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 1 May 2017 12:40:14 -0700 Subject: [PATCH 196/291] Use the bundled NETStandard.Library package in netstandard targeting libraries --- build/dependencies.props | 1 + 1 file changed, 1 insertion(+) diff --git a/build/dependencies.props b/build/dependencies.props index ddf1557fa0..ce80ea3a0f 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -6,6 +6,7 @@ 1.0.0-* 4.3.0 1.1.0 + $(BundledNETStandardPackageVersion) 4.3.1 15.0.0 2.2.0 From eff3bf5a094aca985612cd2767dcf4bf6da8e250 Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Fri, 5 May 2017 09:50:31 -0700 Subject: [PATCH 197/291] Migrate to netcoreapp2.0 --- .../HelloWorldTest.cs | 43 +++--- .../NtlmAuthenticationTest.cs | 32 ++--- .../ResponseCompressionTests.cs | 88 ++++++------- .../ResponseTests.cs | 124 +++++++++--------- .../ServerComparison.FunctionalTests.csproj | 3 +- .../ServerComparison.TestSites.csproj | 3 +- 6 files changed, 141 insertions(+), 152 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index cc92615c89..1d6b0a993e 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -19,52 +19,51 @@ namespace ServerComparison.FunctionalTests { } - // Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601 [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - //[InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] - [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) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task HelloWorld_Windows(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + return HelloWorld(serverType, architecture, applicationType); } [Theory] - //[InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x86, ApplicationType.Standalone, Skip = "https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task HelloWorld_Kestrel(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + return HelloWorld(serverType, architecture, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task HelloWorld_Nginx(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + return HelloWorld(serverType, architecture, applicationType); } - public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) + public async Task HelloWorld(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) { - testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("HelloWorld"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) { 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 ? "net46" : "netcoreapp2.0", + TargetFramework = "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 9e653faef4..1ce34d5a9a 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,6 +1,5 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NET46 using System.Net; using System.Net.Http; @@ -21,29 +20,26 @@ namespace ServerComparison.FunctionalTests { } - [ConditionalTheory(Skip = "https://github.com/aspnet/ServerTests/issues/70")] - [Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] + [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // TODO: https://github.com/aspnet/IISIntegration/issues/1 - // [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable)] - // [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - // [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/IISIntegration/issues/1")] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public async Task NtlmAuthentication(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + var testName = $"NtlmAuthentication_{serverType}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("NtlmAuthenticationTest"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) { 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 ? "net46" : "netcoreapp2.0", + TargetFramework = "netcoreapp2.0", ApplicationType = applicationType }; @@ -67,7 +63,7 @@ namespace ServerComparison.FunctionalTests response = await httpClient.GetAsync("/Anonymous"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Anonymous?True", responseText); - + /* https://github.com/aspnet/ServerTests/issues/82 logger.LogInformation("Testing /Restricted"); response = await httpClient.GetAsync("/Restricted"); responseText = await response.Content.ReadAsStringAsync(); @@ -94,7 +90,7 @@ namespace ServerComparison.FunctionalTests logger.LogInformation("Testing /Forbidden"); response = await httpClient.GetAsync("/Forbidden"); Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); - + */ logger.LogInformation("Enabling Default Credentials"); // Change the http client to one that uses default credentials @@ -145,8 +141,4 @@ namespace ServerComparison.FunctionalTests } } } -} -#elif NETCOREAPP2_0 -#else -#error target frameworks need to be updated -#endif +} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 57321caa42..48e83aa4b9 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -33,110 +33,110 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } - public async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) + public async Task ResponseCompression(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) { - testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("ResponseCompression"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) { EnvironmentName = "ResponseCompression", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, hostCompression ? "http.config" : "NoCompression.config", hostCompression ? "nginx.conf" : "NoCompression.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp2.0", + TargetFramework = "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index cf2e388738..3b80e5284d 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -27,151 +27,151 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckContentLengthAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, 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) + public Task ResponseFormats_Windows_Http10ConnectionClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/WebListener/issues/259 + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] // 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) + public Task ResponseFormats_Windows_Http11ConnectionClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckManuallyChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - // [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) + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/IISIntegration/issues/7")] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); + return ResponseFormats(serverType, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } - public async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) + public async Task ResponseFormats(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) { - testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; + testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("ResponseFormats"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) { EnvironmentName = "Responses", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net46" : "netcoreapp2.0", + TargetFramework = "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 3f6c38c390..8ce3215b6e 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -3,8 +3,7 @@ - netcoreapp2.0;net46 - netcoreapp2.0 + netcoreapp2.0 true true diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index e65266a974..8097efd487 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -3,8 +3,7 @@ - net46;netcoreapp2.0 - netcoreapp2.0 + netcoreapp2.0 win7-x86;win7-x64;linux-x64;osx-x64 From bb2d2ad1e52de46d9cbba735ce9198909e194939 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Fri, 5 May 2017 10:31:22 -0700 Subject: [PATCH 198/291] Update InternalAspNetCoreSdkVersion --- build/dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index ce80ea3a0f..4d982430a6 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,7 +1,7 @@ 2.0.0-preview1-* - 2.0.0-* + 2.1.0-* 0.4.0-* 1.0.0-* 4.3.0 From cf9ab38796cfd056c68fcc08526754bfeebc967d Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 10 May 2017 11:48:06 -0700 Subject: [PATCH 199/291] Remove unnecessary package references (#84) --- build/dependencies.props | 3 --- .../ServerComparison.FunctionalTests.csproj | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 29511b77d5..2eaab66165 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,10 +4,7 @@ 2.0.0-* 0.4.0-* 1.0.0-* - 4.3.0 - 1.1.0 $(BundledNETStandardPackageVersion) - 4.3.1 15.0.0 2.2.0 diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 8ce3215b6e..9fbe1d595a 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,4 +1,4 @@ - + @@ -18,7 +18,6 @@ - From 8ecf6874e837d6ea53a32bed04d767143728aa99 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 12 May 2017 14:12:07 -0700 Subject: [PATCH 200/291] Upgrade test framework versions --- build/dependencies.props | 6 +++--- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 +- .../ResponseCompressionTests.cs | 2 +- test/ServerComparison.FunctionalTests/ResponseTests.cs | 2 +- .../ServerComparison.FunctionalTests.csproj | 4 ---- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 2eaab66165..fa91e33e10 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,11 +1,11 @@ 2.0.0-* - 2.0.0-* + 2.1.0-* 0.4.0-* 1.0.0-* $(BundledNETStandardPackageVersion) - 15.0.0 - 2.2.0 + 15.3.0-* + 2.3.0-beta2-* diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 1d6b0a993e..35e56651af 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -51,7 +51,7 @@ namespace ServerComparison.FunctionalTests return HelloWorld(serverType, architecture, applicationType); } - public async Task HelloWorld(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) + private async Task HelloWorld(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) { testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 48e83aa4b9..f56c23cd45 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -122,7 +122,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } - public async Task ResponseCompression(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) + private async Task ResponseCompression(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) { testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 3b80e5284d..08da889101 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -159,7 +159,7 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } - public async Task ResponseFormats(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) + private async Task ResponseFormats(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) { testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 9fbe1d595a..ad3711a850 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -24,8 +24,4 @@ - - - - From 6cbc736f68bd7bea8b4420e33b9801e4a249592b Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 15 May 2017 12:38:26 -0700 Subject: [PATCH 201/291] Remove workaround from test project --- .../ServerComparison.FunctionalTests.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index ad3711a850..98344c59da 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -4,8 +4,6 @@ netcoreapp2.0 - true - true From c4414c362f1759e4cc54762324ab2e07c6ff2d34 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 17 May 2017 13:42:11 -0700 Subject: [PATCH 202/291] ServerTests => Auth 2.0 --- .../NtlmAuthenticationTest.cs | 55 +++---------------- .../StartupNtlmAuthentication.cs | 36 ++---------- 2 files changed, 12 insertions(+), 79 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 1ce34d5a9a..fb6a1f2707 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -24,7 +24,8 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/IISIntegration/issues/1")] + [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Standalone)] public async Task NtlmAuthentication(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) @@ -70,66 +71,26 @@ namespace ServerComparison.FunctionalTests Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); - - logger.LogInformation("Testing /RestrictedNTLM"); - response = await httpClient.GetAsync("/RestrictedNTLM"); - responseText = await response.Content.ReadAsStringAsync(); - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); - Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); - // Note IIS can't restrict a challenge to a specific auth type, the native auth modules always add themselves. - // However WebListener can. - if (serverType == ServerType.WebListener) - { - Assert.DoesNotContain("Negotiate", response.Headers.WwwAuthenticate.ToString()); - } - else if (serverType == ServerType.IISExpress) - { - Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); - } + */ logger.LogInformation("Testing /Forbidden"); response = await httpClient.GetAsync("/Forbidden"); Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); - */ + logger.LogInformation("Enabling Default Credentials"); // Change the http client to one that uses default credentials httpClient = deploymentResult.CreateHttpClient(new HttpClientHandler() { UseDefaultCredentials = true }); - logger.LogInformation("Testing /AutoForbid"); - response = await httpClient.GetAsync("/AutoForbid"); - responseText = await response.Content.ReadAsStringAsync(); - Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); - logger.LogInformation("Testing /Restricted"); response = await httpClient.GetAsync("/Restricted"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("Negotiate", responseText); + Assert.Equal("Authenticated", responseText); - logger.LogInformation("Testing /RestrictedNegotiate"); - response = await httpClient.GetAsync("/RestrictedNegotiate"); - responseText = await response.Content.ReadAsStringAsync(); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("Negotiate", responseText); - - logger.LogInformation("Testing /RestrictedNTLM"); - if (serverType == ServerType.WebListener) - { - response = await httpClient.GetAsync("/RestrictedNTLM"); - responseText = await response.Content.ReadAsStringAsync(); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("NTLM", responseText); - } - else if (serverType == ServerType.IISExpress) - { - response = await httpClient.GetAsync("/RestrictedNTLM"); - responseText = await response.Content.ReadAsStringAsync(); - // This isn't a Forbidden because we authenticate with Negotiate and challenge for NTLM. - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); - // Note IIS can't restrict a challenge to a specific auth type, the native auth modules always add themselves, - // so both Negotiate and NTLM get sent again. - } + logger.LogInformation("Testing /Forbidden"); + response = await httpClient.GetAsync("/Forbidden"); + Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); } catch (XunitException) { diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index d35a434c50..3b28151aac 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; @@ -41,46 +42,17 @@ namespace ServerComparison.TestSites { if (context.User.Identity.IsAuthenticated) { - return context.Response.WriteAsync(context.User.Identity.AuthenticationType); + return context.Response.WriteAsync("Authenticated"); } else { - return context.Authentication.ChallengeAsync(); + return context.ChallengeAsync(); } } if (context.Request.Path.Equals("/Forbidden")) { - return context.Authentication.ForbidAsync(Microsoft.AspNetCore.Http.Authentication.AuthenticationManager.AutomaticScheme); - } - - if (context.Request.Path.Equals("/AutoForbid")) - { - return context.Authentication.ChallengeAsync(); - } - - if (context.Request.Path.Equals("/RestrictedNegotiate")) - { - if (string.Equals("Negotiate", context.User.Identity.AuthenticationType, System.StringComparison.Ordinal)) - { - return context.Response.WriteAsync("Negotiate"); - } - else - { - return context.Authentication.ChallengeAsync("Negotiate"); - } - } - - if (context.Request.Path.Equals("/RestrictedNTLM")) - { - if (string.Equals("NTLM", context.User.Identity.AuthenticationType, System.StringComparison.Ordinal)) - { - return context.Response.WriteAsync("NTLM"); - } - else - { - return context.Authentication.ChallengeAsync("NTLM"); - } + return context.ForbidAsync(); } return context.Response.WriteAsync("Hello World"); From 9dd8f1c4b96c03dc288a90d7ed85cfffee5949ab Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Fri, 26 May 2017 12:44:43 -0700 Subject: [PATCH 203/291] Updated to use the latest shared runtime --- build/dependencies.props | 1 + 1 file changed, 1 insertion(+) diff --git a/build/dependencies.props b/build/dependencies.props index fa91e33e10..5f84a34db8 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,6 +5,7 @@ 0.4.0-* 1.0.0-* $(BundledNETStandardPackageVersion) + 2.0.0-* 15.3.0-* 2.3.0-beta2-* From a66cca5e2219408606f14a0dc4f60abda909af8f Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 23 May 2017 11:56:54 -0700 Subject: [PATCH 204/291] Add net461 test targets --- ServerTests.sln | 5 +- build/common.props | 4 +- build/dependencies.props | 2 +- .../HelloWorldTest.cs | 42 +++--- .../NtlmAuthenticationTest.cs | 29 ++-- .../ResponseCompressionTests.cs | 88 ++++++------- .../ResponseTests.cs | 124 +++++++++--------- .../ServerComparison.FunctionalTests.csproj | 3 +- .../ServerComparison.TestSites.csproj | 3 +- 9 files changed, 155 insertions(+), 145 deletions(-) diff --git a/ServerTests.sln b/ServerTests.sln index 8f87a50c85..26bb97e4b6 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,10 +1,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.0 +VisualStudioVersion = 15.0.26510.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject + build\common.props = build\common.props + build\dependencies.props = build\dependencies.props NuGet.config = NuGet.config + build\repo.props = build\repo.props EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FA91F388-F4AF-4850-9D68-D4D128E6B1A6}" diff --git a/build/common.props b/build/common.props index 8cd6bbde65..d3fbb81977 100644 --- a/build/common.props +++ b/build/common.props @@ -13,8 +13,8 @@ - - + + diff --git a/build/dependencies.props b/build/dependencies.props index 5f84a34db8..e60cb99744 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,7 +4,7 @@ 2.1.0-* 0.4.0-* 1.0.0-* - $(BundledNETStandardPackageVersion) + 2.0.0-* 2.0.0-* 15.3.0-* 2.3.0-beta2-* diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 35e56651af..034074cf2a 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -22,48 +22,48 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Windows(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [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)] + [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, architecture, applicationType); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x86, ApplicationType.Standalone, Skip = "https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Kestrel(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return HelloWorld(serverType, architecture, applicationType); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Nginx(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return HelloWorld(serverType, architecture, applicationType); + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } - private async Task HelloWorld(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) + private async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) { - testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; + testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("HelloWorld"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { 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 = "netcoreapp2.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index fb6a1f2707..9de2e35a04 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,5 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if NET461 // https://github.com/aspnet/ServerTests/issues/82 using System.Net; using System.Net.Http; @@ -21,26 +22,27 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] + [Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public async Task NtlmAuthentication(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [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)] + [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)] + public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - var testName = $"NtlmAuthentication_{serverType}_{architecture}_{applicationType}"; + var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("NtlmAuthenticationTest"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { 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 = "netcoreapp2.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0", ApplicationType = applicationType }; @@ -64,14 +66,13 @@ namespace ServerComparison.FunctionalTests response = await httpClient.GetAsync("/Anonymous"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal("Anonymous?True", responseText); - /* https://github.com/aspnet/ServerTests/issues/82 + logger.LogInformation("Testing /Restricted"); response = await httpClient.GetAsync("/Restricted"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); - */ logger.LogInformation("Testing /Forbidden"); response = await httpClient.GetAsync("/Forbidden"); @@ -102,4 +103,8 @@ namespace ServerComparison.FunctionalTests } } } -} \ No newline at end of file +} +#elif NETCOREAPP2_0 +#else +#error target frameworks need to be updated +#endif diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index f56c23cd45..79195aa887 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -33,110 +33,110 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Windows_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_HostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Standalone)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Standalone)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task ResponseCompression_Windows_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Nginx_AppAndHostCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseCompression(serverType, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } - private async Task ResponseCompression(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) + private async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) { - testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; + testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("ResponseCompression"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { EnvironmentName = "ResponseCompression", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, hostCompression ? "http.config" : "NoCompression.config", hostCompression ? "nginx.conf" : "NoCompression.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - TargetFramework = "netcoreapp2.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 08da889101..8636f2f380 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -27,151 +27,151 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, RuntimeArchitecture architecture, ApplicationType applicationType) + public Task ResponseFormats_Windows_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckHttp10ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, RuntimeArchitecture architecture, ApplicationType applicationType) + public Task ResponseFormats_Windows_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckHttp10ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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, architecture, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/IISIntegration/issues/7")] - [InlineData(ServerType.WebListener, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_ManuallyChunkAndClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + // [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, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { - return ResponseFormats(serverType, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); + return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); } - private async Task ResponseFormats(ServerType serverType, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) + private async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) { - testName = $"{testName}_{serverType}_{architecture}_{applicationType}"; + testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) { var logger = loggerFactory.CreateLogger("ResponseFormats"); - var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, RuntimeFlavor.CoreClr, architecture) + var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture) { EnvironmentName = "Responses", ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config - TargetFramework = "netcoreapp2.0", + TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0", ApplicationType = applicationType }; diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 98344c59da..71a908e715 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -3,7 +3,8 @@ - netcoreapp2.0 + netcoreapp2.0;net461 + netcoreapp2.0 diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 8097efd487..d48c04e691 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -3,7 +3,8 @@ - netcoreapp2.0 + net461;netcoreapp2.0 + netcoreapp2.0 win7-x86;win7-x64;linux-x64;osx-x64 From e072f1a1a43815aaf09da4daa15e779675c4ceb1 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 31 May 2017 19:37:24 -0700 Subject: [PATCH 205/291] Branching for rel/2.0.0-preview2 --- NuGet.config | 7 ++++--- build/dependencies.props | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NuGet.config b/NuGet.config index 8e65695611..c4bc056c4d 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,8 +1,9 @@ - + - + + - + \ No newline at end of file diff --git a/build/dependencies.props b/build/dependencies.props index e60cb99744..77dec4cbde 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,6 +1,6 @@ - 2.0.0-* + 2.0.0-preview2-* 2.1.0-* 0.4.0-* 1.0.0-* From 516e88f4b3843171e750715fe7f393990d97bafd Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 31 May 2017 19:53:34 -0700 Subject: [PATCH 206/291] Updating build scripts to point to 2.0.0-preview2 KoreBuild --- build.ps1 | 2 +- build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index 5bf0e2c113..3a2476b2b4 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0-preview2.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index b0bcadb579..a40bdb87b1 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0-preview2.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi From 74d0e133f5bf96c813fa7202a301232470ee3c6a Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 1 Jun 2017 10:47:48 -0700 Subject: [PATCH 207/291] Updating versions to preview3 --- NuGet.config | 3 ++- version.props | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NuGet.config b/NuGet.config index 8e65695611..4e8a1f6de1 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,6 +1,7 @@ - + + diff --git a/version.props b/version.props index 6af4f81de2..193a5999d8 100644 --- a/version.props +++ b/version.props @@ -2,6 +2,6 @@ 2.0.0 - preview2 + preview3 From 9344659b4fbaae1fbd9aea6291e6f2be3f4ead32 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 29 Jun 2017 08:51:10 -0700 Subject: [PATCH 208/291] Add NETStandardImplicitPackageVersion --- build/dependencies.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index e60cb99744..1078340408 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,9 +1,10 @@ - + 2.0.0-* 2.1.0-* 0.4.0-* 1.0.0-* + 2.0.0-* 2.0.0-* 2.0.0-* 15.3.0-* From 2462b9f173d7f234f29f53bbb8693b33f23af7ce Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 3 Jul 2017 14:08:03 -0700 Subject: [PATCH 209/291] Update LICENSE.txt text --- LICENSE.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 0bdc1962b6..7b2956ecee 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,10 +1,12 @@ -Copyright (c) .NET Foundation. All rights reserved. +Copyright (c) .NET Foundation and Contributors + +All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use -these files except in compliance with the License. You may obtain a copy of the +this file except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR From 775b831ac2084343a77544bc20b46f04e2f48315 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 6 Jul 2017 10:39:21 -0700 Subject: [PATCH 210/291] React to aspnet/BuildTools#293 [ci skip] --- build/dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index 1078340408..805480e71b 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,7 +1,7 @@  2.0.0-* - 2.1.0-* + 2.0.1-* 0.4.0-* 1.0.0-* 2.0.0-* From 351e6c9c5d7678ca0bf60d9bb469541f7497d092 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Thu, 6 Jul 2017 12:27:29 -0700 Subject: [PATCH 211/291] Set "TreatWarningsAsErrors" before NuGet restore * Ensures our build stays clean of NuGet warnings --- build/common.props | 1 + 1 file changed, 1 insertion(+) diff --git a/build/common.props b/build/common.props index d3fbb81977..a86701cb07 100644 --- a/build/common.props +++ b/build/common.props @@ -7,6 +7,7 @@ https://github.com/aspnet/servertests git $(VersionSuffix)-$(BuildNumber) + true From 6138af3240a37ff8df27e66d115304b6bf05c0b3 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 6 Jul 2017 15:08:52 -0700 Subject: [PATCH 212/291] Update version suffix for 2.0.0 RTM release --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 193a5999d8..eba6b16756 100644 --- a/version.props +++ b/version.props @@ -2,6 +2,6 @@ 2.0.0 - preview3 + rtm From cad389a75bea2f696c934d6caba58997b33147b1 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Thu, 6 Jul 2017 15:31:12 -0700 Subject: [PATCH 213/291] Remove NETSTandard.Library.NETFramework --- build/common.props | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/common.props b/build/common.props index a86701cb07..8534b2a0d9 100644 --- a/build/common.props +++ b/build/common.props @@ -14,8 +14,4 @@ - - - - From 5ab63adf2e7db7008d1e4fcc0be04b51650a6f1b Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 7 Jul 2017 12:16:20 -0700 Subject: [PATCH 214/291] Specify scheme for tests --- test/ServerComparison.TestSites/StartupNtlmAuthentication.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs index 3b28151aac..c4e837db58 100644 --- a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs +++ b/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs @@ -46,13 +46,13 @@ namespace ServerComparison.TestSites } else { - return context.ChallengeAsync(); + return context.ChallengeAsync("Windows"); } } if (context.Request.Path.Equals("/Forbidden")) { - return context.ForbidAsync(); + return context.ForbidAsync("Windows"); } return context.Response.WriteAsync("Hello World"); From ee6221c964deb9ff276def5bd74cb98bdab684df Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 10 Jul 2017 11:46:15 -0700 Subject: [PATCH 215/291] Branching for 2.0.0 rtm --- NuGet.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 4e8a1f6de1..37f0d27ea0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,7 +2,7 @@ - + From 3de03ca623be192d5ead6fef3c6e9a4d92ae4465 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 10 Jul 2017 11:58:01 -0700 Subject: [PATCH 216/291] Updating KoreBuild branch --- build.ps1 | 2 +- build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index 5bf0e2c113..1785334385 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index b0bcadb579..5e27ed8efb 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi From 338a99ed7bd01a492c8e925374118a65824459a1 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Fri, 21 Jul 2017 13:02:52 -0700 Subject: [PATCH 217/291] 2.0.0-rtm to 2.1.0-preview1 --- version.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.props b/version.props index eba6b16756..1ea46af42a 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ - 2.0.0 - rtm + 2.1.0 + preview1 From 200df9443a53e9025a685794525d5fae1bdf954f Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Mon, 24 Jul 2017 17:58:51 -0700 Subject: [PATCH 218/291] Set AspNetCoreVersion --- build/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 805480e71b..b4e73e8ea3 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,6 +1,6 @@ - + - 2.0.0-* + 2.1.0-* 2.0.1-* 0.4.0-* 1.0.0-* From 2154c3623a459ad1c358abf83d282b3f8d3fe17f Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 25 Jul 2017 15:14:55 -0700 Subject: [PATCH 219/291] Updating to InternalAspNetCoreSdkVersion 2.1.1-* --- build/dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index b4e73e8ea3..72a47131df 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,7 +1,7 @@ 2.1.0-* - 2.0.1-* + 2.1.1-* 0.4.0-* 1.0.0-* 2.0.0-* From b38e680cf57c0ad2791f6afc31355cbd2efb0a3e Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 25 Jul 2017 16:34:51 -0700 Subject: [PATCH 220/291] Update bootstrappers to use the compiled version of KoreBuild [ci skip] --- .gitignore | 1 + build.cmd | 2 +- build.ps1 | 218 +++++++++++++++++++++++++--------- build.sh | 224 +++++++++++++++++++++++++++++------ build/common.props | 2 +- version.props => version.xml | 3 +- 6 files changed, 356 insertions(+), 94 deletions(-) rename version.props => version.xml (55%) diff --git a/.gitignore b/.gitignore index a7760db659..f15353fb84 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ project.lock.json .testPublish/ .build/ global.json +korebuild-lock.txt diff --git a/build.cmd b/build.cmd index 7d4894cb4a..b6c8d24864 100644 --- a/build.cmd +++ b/build.cmd @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" \ No newline at end of file +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" diff --git a/build.ps1 b/build.ps1 index 5bf0e2c113..d5eb4d5cf2 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,67 +1,177 @@ -$ErrorActionPreference = "Stop" +#!/usr/bin/env powershell +#requires -version 4 -function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) -{ - while($true) - { - try - { - Invoke-WebRequest $url -OutFile $downloadLocation - break - } - catch - { - $exceptionMessage = $_.Exception.Message - Write-Host "Failed to download '$url': $exceptionMessage" - if ($retries -gt 0) { - $retries-- - Write-Host "Waiting 10 seconds before retrying. Retries left: $retries" - Start-Sleep -Seconds 10 +<# +.SYNOPSIS +Build this repository +.DESCRIPTION +Downloads korebuild if required. Then builds the repository. + +.PARAMETER Path +The folder to build. Defaults to the folder containing this script. + +.PARAMETER Channel +The channel of KoreBuild to download. Overrides the value from the config file. + +.PARAMETER DotNetHome +The directory where .NET Core tools will be stored. + +.PARAMETER ToolsSource +The base url where build tools can be downloaded. Overrides the value from the config file. + +.PARAMETER Update +Updates KoreBuild to the latest version even if a lock file is present. + +.PARAMETER ConfigFile +The path to the configuration file that stores values. Defaults to version.xml. + +.PARAMETER MSBuildArgs +Arguments to be passed to MSBuild + +.NOTES +This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be. +When the lockfile is not present, KoreBuild will create one using latest available version from $Channel. + +The $ConfigFile is expected to be an XML file. It is optional, and the configuration values in it are optional as well. + +.EXAMPLE +Example config file: +```xml + + + + dev + https://aspnetcore.blob.core.windows.net/buildtools + + +``` +#> +[CmdletBinding(PositionalBinding = $false)] +param( + [string]$Path = $PSScriptRoot, + [Alias('c')] + [string]$Channel, + [Alias('d')] + [string]$DotNetHome, + [Alias('s')] + [string]$ToolsSource, + [Alias('u')] + [switch]$Update, + [string]$ConfigFile = (Join-Path $PSScriptRoot 'version.xml'), + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$MSBuildArgs +) + +Set-StrictMode -Version 2 +$ErrorActionPreference = 'Stop' + +# +# Functions +# + +function Get-KoreBuild { + + $lockFile = Join-Path $Path 'korebuild-lock.txt' + + if (!(Test-Path $lockFile) -or $Update) { + Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile + } + + $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 + if (!$version) { + Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'" + } + $version = $version.TrimStart('version:').Trim() + $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) + + if (!(Test-Path $korebuildPath)) { + Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" + New-Item -ItemType Directory -Path $korebuildPath | Out-Null + $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip" + + try { + $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" + Get-RemoteFile $remotePath $tmpfile + if (Get-Command -Name 'Expand-Archive' -ErrorAction Ignore) { + # Use built-in commands where possible as they are cross-plat compatible + Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath } - else - { - $exception = $_.Exception - throw $exception + else { + # Fallback to old approach for old installations of PowerShell + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath) } } + catch { + Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore + throw + } + finally { + Remove-Item $tmpfile -ErrorAction Ignore + } } + + return $korebuildPath } -cd $PSScriptRoot - -$repoFolder = $PSScriptRoot -$env:REPO_FOLDER = $repoFolder - -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" -if ($env:KOREBUILD_ZIP) -{ - $koreBuildZip=$env:KOREBUILD_ZIP +function Join-Paths([string]$path, [string[]]$childPaths) { + $childPaths | ForEach-Object { $path = Join-Path $path $_ } + return $path } -$buildFolder = ".build" -$buildFile="$buildFolder\KoreBuild.ps1" - -if (!(Test-Path $buildFolder)) { - Write-Host "Downloading KoreBuild from $koreBuildZip" - - $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid() - New-Item -Path "$tempFolder" -Type directory | Out-Null - - $localZipFile="$tempFolder\korebuild.zip" - - DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6 - - Add-Type -AssemblyName System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) - - New-Item -Path "$buildFolder" -Type directory | Out-Null - copy-item "$tempFolder\**\build\*" $buildFolder -Recurse - - # Cleanup - if (Test-Path $tempFolder) { - Remove-Item -Recurse -Force $tempFolder +function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { + if ($RemotePath -notlike 'http*') { + Copy-Item $RemotePath $LocalPath + return } + + $retries = 10 + while ($retries -gt 0) { + $retries -= 1 + try { + Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath + return + } + catch { + Write-Verbose "Request failed. $retries retries remaining" + } + } + + Write-Error "Download failed: '$RemotePath'." } -&"$buildFile" @args +# +# Main +# + +# Load configuration or set defaults + +if (Test-Path $ConfigFile) { + [xml] $config = Get-Content $ConfigFile + if (!($Channel)) { [string] $Channel = Select-Xml -Xml $config -XPath '/Project/PropertyGroup/KoreBuildChannel' } + if (!($ToolsSource)) { [string] $ToolsSource = Select-Xml -Xml $config -XPath '/Project/PropertyGroup/KoreBuildToolsSource' } +} + +if (!$DotNetHome) { + $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } ` + elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} ` + elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}` + else { Join-Path $PSScriptRoot '.dotnet'} +} + +if (!$Channel) { $Channel = 'dev' } +if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } + +# Execute + +$korebuildPath = Get-KoreBuild +Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') + +try { + Install-Tools $ToolsSource $DotNetHome + Invoke-RepositoryBuild $Path @MSBuildArgs +} +finally { + Remove-Module 'KoreBuild' -ErrorAction Ignore +} diff --git a/build.sh b/build.sh index b0bcadb579..ab590e62f1 100755 --- a/build.sh +++ b/build.sh @@ -1,46 +1,196 @@ #!/usr/bin/env bash -repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" -if [ ! -z $KOREBUILD_ZIP ]; then - koreBuildZip=$KOREBUILD_ZIP -fi +set -euo pipefail -buildFolder=".build" -buildFile="$buildFolder/KoreBuild.sh" +# +# variables +# -if test ! -d $buildFolder; then - echo "Downloading KoreBuild from $koreBuildZip" +RESET="\033[0m" +RED="\033[0;31m" +MAGENTA="\033[0;95m" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +[ -z "${DOTNET_HOME:-}"] && DOTNET_HOME="$HOME/.dotnet" +config_file="$DIR/version.xml" +verbose=false +update=false +repo_path="$DIR" +channel='' +tools_source='' - tempFolder="/tmp/KoreBuild-$(uuidgen)" - mkdir $tempFolder +# +# Functions +# +__usage() { + echo "Usage: $(basename ${BASH_SOURCE[0]}) [options] [[--] ...]" + echo "" + echo "Arguments:" + echo " ... Arguments passed to MSBuild. Variable number of arguments allowed." + echo "" + echo "Options:" + echo " --verbose Show verbose output." + echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." + echo " --config-file TThe path to the configuration file that stores values. Defaults to version.xml." + echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." + echo " --path The directory to build. Defaults to the directory containing the script." + echo " -s|--tools-source The base url where build tools can be downloaded. Overrides the value from the config file." + echo " -u|--update Update to the latest KoreBuild even if the lock file is present." + echo "" + echo "Description:" + echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." + echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." - localZipFile="$tempFolder/korebuild.zip" - - retries=6 - until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null) - do - echo "Failed to download '$koreBuildZip'" - if [ "$retries" -le 0 ]; then - exit 1 - fi - retries=$((retries - 1)) - echo "Waiting 10 seconds before retrying. Retries left: $retries" - sleep 10s - done - - unzip -q -d $tempFolder $localZipFile - - mkdir $buildFolder - cp -r $tempFolder/**/build/** $buildFolder - - chmod +x $buildFile - - # Cleanup - if test -d $tempFolder; then - rm -rf $tempFolder + if [[ "${1:-}" != '--no-exit' ]]; then + exit 2 fi +} + +get_korebuild() { + local lock_file="$repo_path/korebuild-lock.txt" + if [ ! -f $lock_file ] || [ "$update" = true ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" $lock_file + fi + local version="$(grep 'version:*' -m 1 $lock_file)" + if [[ "$version" == '' ]]; then + __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" + return 1 + fi + version="$(echo ${version#version:} | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" + + { + if [ ! -d "$korebuild_path" ]; then + mkdir -p "$korebuild_path" + local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" + tmpfile="$(mktemp)" + echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" + if __get_remote_file $remote_path $tmpfile; then + unzip -q -d "$korebuild_path" $tmpfile + fi + rm $tmpfile || true + fi + + source "$korebuild_path/KoreBuild.sh" + } || { + if [ -d "$korebuild_path" ]; then + echo "Cleaning up after failed installation" + rm -rf "$korebuild_path" || true + fi + return 1 + } +} + +__error() { + echo -e "${RED}$@${RESET}" 1>&2 +} + +__machine_has() { + hash "$1" > /dev/null 2>&1 + return $? +} + +__get_remote_file() { + local remote_path=$1 + local local_path=$2 + + if [[ "$remote_path" != 'http'* ]]; then + cp $remote_path $local_path + return 0 + fi + + failed=false + if __machine_has wget; then + wget --tries 10 --quiet -O $local_path $remote_path || failed=true + fi + + if [ "$failed" = true ] && __machine_has curl; then + failed=false + curl --retry 10 -sSL -f --create-dirs -o $local_path $remote_path || failed=true + fi + + if [ "$failed" = true ]; then + __error "Download failed: $remote_path" 1>&2 + return 1 + fi +} + +__read_dom () { local IFS=\> ; read -d \< ENTITY CONTENT ;} + +# +# main +# + +while [[ $# > 0 ]]; do + case $1 in + -\?|-h|--help) + __usage --no-exit + exit 0 + ;; + -c|--channel|-Channel) + shift + channel=${1:-} + [ -z "$channel" ] && __usage + ;; + --config-file|-ConfigFile) + shift + config_file="${1:-}" + [ -z "$config_file" ] && __usage + ;; + -d|--dotnet-home|-DotNetHome) + shift + DOTNET_HOME=${1:-} + [ -z "$DOTNET_HOME" ] && __usage + ;; + --path|-Path) + shift + repo_path="${1:-}" + [ -z "$repo_path" ] && __usage + ;; + -s|--tools-source|-ToolsSource) + shift + tools_source="${1:-}" + [ -z "$tools_source" ] && __usage + ;; + -u|--update|-Update) + update=true + ;; + --verbose|-Verbose) + verbose=true + ;; + --) + shift + break + ;; + *) + break + ;; + esac + shift +done + +if ! __machine_has unzip; then + __error 'Missing required command: unzip' + exit 1 fi -$buildFile -r $repoFolder "$@" +if ! __machine_has curl && ! __machine_has wget; then + __error 'Missing required command. Either wget or curl is required.' + exit 1 +fi + +if [ -f $config_file ]; then + comment=false + while __read_dom; do + if [ "$comment" = true ]; then [[ $CONTENT == *'-->'* ]] && comment=false ; continue; fi + if [[ $ENTITY == '!--'* ]]; then comment=true; continue; fi + if [ -z "$channel" ] && [[ $ENTITY == "KoreBuildChannel" ]]; then channel=$CONTENT; fi + if [ -z "$tools_source" ] && [[ $ENTITY == "KoreBuildToolsSource" ]]; then tools_source=$CONTENT; fi + done < $config_file +fi + +[ -z "$channel" ] && channel='dev' +[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' + +get_korebuild +install_tools "$tools_source" "$DOTNET_HOME" +invoke_repository_build "$repo_path" $@ diff --git a/build/common.props b/build/common.props index 8534b2a0d9..922705e044 100644 --- a/build/common.props +++ b/build/common.props @@ -1,6 +1,6 @@ - + Microsoft ASP.NET Core diff --git a/version.props b/version.xml similarity index 55% rename from version.props rename to version.xml index 1ea46af42a..3c05022b7d 100644 --- a/version.props +++ b/version.xml @@ -1,6 +1,7 @@ - + + dev 2.1.0 preview1 From 6f34599de96e1c14402644c55c87f25d644e10bf Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 26 Jul 2017 10:29:08 -0700 Subject: [PATCH 221/291] Fix syntax warning when running build.sh on older versions of bash [ci skip] --- build.sh | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/build.sh b/build.sh index ab590e62f1..5568c6182a 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ RESET="\033[0m" RED="\033[0;31m" MAGENTA="\033[0;95m" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -[ -z "${DOTNET_HOME:-}"] && DOTNET_HOME="$HOME/.dotnet" +[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" config_file="$DIR/version.xml" verbose=false update=false @@ -22,7 +22,7 @@ tools_source='' # Functions # __usage() { - echo "Usage: $(basename ${BASH_SOURCE[0]}) [options] [[--] ...]" + echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] ...]" echo "" echo "Arguments:" echo " ... Arguments passed to MSBuild. Variable number of arguments allowed." @@ -46,16 +46,17 @@ __usage() { } get_korebuild() { + local version local lock_file="$repo_path/korebuild-lock.txt" - if [ ! -f $lock_file ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" $lock_file + if [ ! -f "$lock_file" ] || [ "$update" = true ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" fi - local version="$(grep 'version:*' -m 1 $lock_file)" + version="$(grep 'version:*' -m 1 "$lock_file")" if [[ "$version" == '' ]]; then __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" return 1 fi - version="$(echo ${version#version:} | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" { @@ -64,10 +65,10 @@ get_korebuild() { local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" tmpfile="$(mktemp)" echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" - if __get_remote_file $remote_path $tmpfile; then - unzip -q -d "$korebuild_path" $tmpfile + if __get_remote_file "$remote_path" "$tmpfile"; then + unzip -q -d "$korebuild_path" "$tmpfile" fi - rm $tmpfile || true + rm "$tmpfile" || true fi source "$korebuild_path/KoreBuild.sh" @@ -81,7 +82,7 @@ get_korebuild() { } __error() { - echo -e "${RED}$@${RESET}" 1>&2 + echo -e "${RED}$*${RESET}" 1>&2 } __machine_has() { @@ -94,18 +95,18 @@ __get_remote_file() { local local_path=$2 if [[ "$remote_path" != 'http'* ]]; then - cp $remote_path $local_path + cp "$remote_path" "$local_path" return 0 fi failed=false if __machine_has wget; then - wget --tries 10 --quiet -O $local_path $remote_path || failed=true + wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true fi if [ "$failed" = true ] && __machine_has curl; then failed=false - curl --retry 10 -sSL -f --create-dirs -o $local_path $remote_path || failed=true + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true fi if [ "$failed" = true ]; then @@ -114,13 +115,13 @@ __get_remote_file() { fi } -__read_dom () { local IFS=\> ; read -d \< ENTITY CONTENT ;} +__read_dom () { local IFS=\> ; read -r -d \< ENTITY CONTENT ;} # # main # -while [[ $# > 0 ]]; do +while [[ $# -gt 0 ]]; do case $1 in -\?|-h|--help) __usage --no-exit @@ -128,7 +129,7 @@ while [[ $# > 0 ]]; do ;; -c|--channel|-Channel) shift - channel=${1:-} + channel="${1:-}" [ -z "$channel" ] && __usage ;; --config-file|-ConfigFile) @@ -138,7 +139,7 @@ while [[ $# > 0 ]]; do ;; -d|--dotnet-home|-DotNetHome) shift - DOTNET_HOME=${1:-} + DOTNET_HOME="${1:-}" [ -z "$DOTNET_HOME" ] && __usage ;; --path|-Path) @@ -178,14 +179,14 @@ if ! __machine_has curl && ! __machine_has wget; then exit 1 fi -if [ -f $config_file ]; then +if [ -f "$config_file" ]; then comment=false while __read_dom; do if [ "$comment" = true ]; then [[ $CONTENT == *'-->'* ]] && comment=false ; continue; fi if [[ $ENTITY == '!--'* ]]; then comment=true; continue; fi if [ -z "$channel" ] && [[ $ENTITY == "KoreBuildChannel" ]]; then channel=$CONTENT; fi if [ -z "$tools_source" ] && [[ $ENTITY == "KoreBuildToolsSource" ]]; then tools_source=$CONTENT; fi - done < $config_file + done < "$config_file" fi [ -z "$channel" ] && channel='dev' @@ -193,4 +194,4 @@ fi get_korebuild install_tools "$tools_source" "$DOTNET_HOME" -invoke_repository_build "$repo_path" $@ +invoke_repository_build "$repo_path" "$@" From c678d6cda37e4d87e5d15f54d2325d394883c1ca Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 2 Aug 2017 12:44:48 -0700 Subject: [PATCH 222/291] Update __get_remote_file logic --- build.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 5568c6182a..8eace4c20d 100755 --- a/build.sh +++ b/build.sh @@ -99,17 +99,16 @@ __get_remote_file() { return 0 fi - failed=false + local succeeded=false if __machine_has wget; then - wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true + wget --tries 10 --quiet -O "$local_path" "$remote_path" && succeeded=true fi - if [ "$failed" = true ] && __machine_has curl; then - failed=false - curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true + if [ "$succeeded" = false ] && __machine_has curl; then + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" && succeeded=true fi - if [ "$failed" = true ]; then + if [ "$succeeded" = false ]; then __error "Download failed: $remote_path" 1>&2 return 1 fi From 8391a751dfe0c2cb3d2ee5a58b03552e5bec8a14 Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 2 Aug 2017 14:33:58 -0700 Subject: [PATCH 223/291] Ensure fallback to curl after failed wget --- build.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 8eace4c20d..11cdbe5504 100755 --- a/build.sh +++ b/build.sh @@ -99,16 +99,19 @@ __get_remote_file() { return 0 fi - local succeeded=false + local failed=false if __machine_has wget; then - wget --tries 10 --quiet -O "$local_path" "$remote_path" && succeeded=true + wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true + else + failed=true fi - if [ "$succeeded" = false ] && __machine_has curl; then - curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" && succeeded=true + if [ "$failed" = true ] && __machine_has curl; then + failed=false + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true fi - if [ "$succeeded" = false ]; then + if [ "$failed" = true ]; then __error "Download failed: $remote_path" 1>&2 return 1 fi From f568fa2bbb7e1d1b643ffa7a387d08f26e03d197 Mon Sep 17 00:00:00 2001 From: John Luo Date: Mon, 7 Aug 2017 17:13:37 -0700 Subject: [PATCH 224/291] Update Microsoft.AspNetCore.Server.IntegrationTesting package version --- build/dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index 72a47131df..2c077ef136 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,7 +2,7 @@ 2.1.0-* 2.1.1-* - 0.4.0-* + 0.5.0-* 1.0.0-* 2.0.0-* 2.0.0-* From a25ca282efb24f43ef46809c3bf5b403182c8203 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 22 Aug 2017 18:22:39 -0700 Subject: [PATCH 225/291] Upgrade to xunit 2.3.0-beta4 --- build/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 2c077ef136..94b9367c7d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -7,7 +7,7 @@ 2.0.0-* 2.0.0-* 2.0.0-* - 15.3.0-* - 2.3.0-beta2-* + 15.3.0 + 2.3.0-beta4-build3742 From 79bc2331856bd632c8a450ebdc2e035775972ac0 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 29 Aug 2017 12:06:39 -0700 Subject: [PATCH 226/291] Use Directory.Build.props/targets --- appveyor.yml => .appveyor.yml | 0 build/common.props => Directory.Build.props | 6 +++--- Directory.Build.targets | 2 ++ ServerTests.sln | 10 ++++++---- .../ServerComparison.FunctionalTests.csproj | 4 +--- .../ServerComparison.TestSites.csproj | 2 -- 6 files changed, 12 insertions(+), 12 deletions(-) rename appveyor.yml => .appveyor.yml (100%) rename build/common.props => Directory.Build.props (85%) create mode 100644 Directory.Build.targets diff --git a/appveyor.yml b/.appveyor.yml similarity index 100% rename from appveyor.yml rename to .appveyor.yml diff --git a/build/common.props b/Directory.Build.props similarity index 85% rename from build/common.props rename to Directory.Build.props index 922705e044..e79bc57a02 100644 --- a/build/common.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - - - + + + Microsoft ASP.NET Core diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000000..f75adf7e4d --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/ServerTests.sln b/ServerTests.sln index 26bb97e4b6..4df338b6d1 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,11 +1,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26510.0 +VisualStudioVersion = 15.0.26730.10 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject - build\common.props = build\common.props - build\dependencies.props = build\dependencies.props + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets NuGet.config = NuGet.config build\repo.props = build\repo.props EndProjectSection @@ -18,7 +18,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{55694E45-5EDE-46F8-80AA-797DE5F8C5C3}" ProjectSection(SolutionItems) = preProject - build\common.props = build\common.props build\dependencies.props = build\dependencies.props build\repo.props = build\repo.props EndProjectSection @@ -45,4 +44,7 @@ Global {A319ACCE-060B-4385-9534-9F2202F6180E} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} {030225D8-4EE8-47E5-B692-2A96B3B51A38} = {FA91F388-F4AF-4850-9D68-D4D128E6B1A6} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8A313020-8407-494F-81D7-7631580C5FCC} + EndGlobalSection EndGlobal diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 71a908e715..6207992157 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,6 +1,4 @@ - - - + netcoreapp2.0;net461 diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index d48c04e691..22adcebdaf 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -1,7 +1,5 @@  - - net461;netcoreapp2.0 netcoreapp2.0 From e155b814349f8ff9dd563480d784c38837b0b59f Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 29 Aug 2017 12:15:58 -0700 Subject: [PATCH 227/291] Use PackageLineup to manage PackageReference versions --- Directory.Build.props | 3 +-- Directory.Build.targets | 14 ++++++++++++- NuGet.config | 1 - build/dependencies.props | 13 ------------ build/repo.props | 4 +++- .../ServerComparison.FunctionalTests.csproj | 18 ++++++++--------- .../ServerComparison.TestSites.csproj | 20 +++++++++---------- 7 files changed, 36 insertions(+), 37 deletions(-) delete mode 100644 build/dependencies.props diff --git a/Directory.Build.props b/Directory.Build.props index e79bc57a02..c5a7a0422f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,4 @@  - @@ -11,7 +10,7 @@ - + diff --git a/Directory.Build.targets b/Directory.Build.targets index f75adf7e4d..bc118fd907 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,2 +1,14 @@ - + + + + <_BootstrapperFile Condition=" $([MSBuild]::IsOSUnixLike()) ">build.sh + <_BootstrapperFile Condition="! $([MSBuild]::IsOSUnixLike()) ">build.cmd + <_BootstrapperError> + Package references have not been pinned. Run './$(_BootstrapperFile) /t:Pin'. + Also, you can run './$(_BootstrapperFile) /t:Restore' which will pin *and* restore packages. '$(_BootstrapperFile)' can be found in '$(MSBuildThisFileDirectory)'. + + + + + diff --git a/NuGet.config b/NuGet.config index 4e8a1f6de1..20060c934e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,7 +3,6 @@ - diff --git a/build/dependencies.props b/build/dependencies.props deleted file mode 100644 index 94b9367c7d..0000000000 --- a/build/dependencies.props +++ /dev/null @@ -1,13 +0,0 @@ - - - 2.1.0-* - 2.1.1-* - 0.5.0-* - 1.0.0-* - 2.0.0-* - 2.0.0-* - 2.0.0-* - 15.3.0 - 2.3.0-beta4-build3742 - - diff --git a/build/repo.props b/build/repo.props index 768f1e2acf..4d0930d3a1 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,5 +1,7 @@ - + + + diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 6207992157..219f3ac2ba 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -10,15 +10,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 22adcebdaf..a70b73f84b 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -7,16 +7,16 @@ - - - - - - - - - - + + + + + + + + + + From 769cf688f5d3f68b1bd021f2924327c9903ae67f Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 21 Sep 2017 17:58:49 -0700 Subject: [PATCH 228/291] Increase Minimum Version of Visual Studio to 15.3.0 --- ServerTests.sln | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ServerTests.sln b/ServerTests.sln index 4df338b6d1..9434226d0a 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26730.10 -MinimumVisualStudioVersion = 10.0.40219.1 +MinimumVisualStudioVersion = 15.0.26730.03 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject Directory.Build.props = Directory.Build.props From 7e41d6f1c4ac43f8dee643880bbd4aece6a64353 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Wed, 20 Sep 2017 13:23:41 -0700 Subject: [PATCH 229/291] Update bootstrappers --- .appveyor.yml | 2 +- build.cmd | 2 +- build.sh | 197 +------------------------------------- run.cmd | 2 + build.ps1 => run.ps1 | 56 +++++++---- run.sh | 223 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 265 insertions(+), 217 deletions(-) create mode 100644 run.cmd rename build.ps1 => run.ps1 (73%) create mode 100755 run.sh diff --git a/.appveyor.yml b/.appveyor.yml index 017b131ccb..e843bad987 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,7 +11,7 @@ environment: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: 1 build_script: - - ps: .\build.ps1 + - ps: .\run.ps1 default-build clone_depth: 1 test: off deploy: off diff --git a/build.cmd b/build.cmd index b6c8d24864..c0050bda12 100644 --- a/build.cmd +++ b/build.cmd @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE" diff --git a/build.sh b/build.sh index 11cdbe5504..98a4b22765 100755 --- a/build.sh +++ b/build.sh @@ -1,199 +1,8 @@ #!/usr/bin/env bash set -euo pipefail - -# -# variables -# - -RESET="\033[0m" -RED="\033[0;31m" -MAGENTA="\033[0;95m" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" -config_file="$DIR/version.xml" -verbose=false -update=false -repo_path="$DIR" -channel='' -tools_source='' -# -# Functions -# -__usage() { - echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] ...]" - echo "" - echo "Arguments:" - echo " ... Arguments passed to MSBuild. Variable number of arguments allowed." - echo "" - echo "Options:" - echo " --verbose Show verbose output." - echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." - echo " --config-file TThe path to the configuration file that stores values. Defaults to version.xml." - echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." - echo " --path The directory to build. Defaults to the directory containing the script." - echo " -s|--tools-source The base url where build tools can be downloaded. Overrides the value from the config file." - echo " -u|--update Update to the latest KoreBuild even if the lock file is present." - echo "" - echo "Description:" - echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." - echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." - - if [[ "${1:-}" != '--no-exit' ]]; then - exit 2 - fi -} - -get_korebuild() { - local version - local lock_file="$repo_path/korebuild-lock.txt" - if [ ! -f "$lock_file" ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" - fi - version="$(grep 'version:*' -m 1 "$lock_file")" - if [[ "$version" == '' ]]; then - __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" - return 1 - fi - version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" - local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" - - { - if [ ! -d "$korebuild_path" ]; then - mkdir -p "$korebuild_path" - local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" - tmpfile="$(mktemp)" - echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" - if __get_remote_file "$remote_path" "$tmpfile"; then - unzip -q -d "$korebuild_path" "$tmpfile" - fi - rm "$tmpfile" || true - fi - - source "$korebuild_path/KoreBuild.sh" - } || { - if [ -d "$korebuild_path" ]; then - echo "Cleaning up after failed installation" - rm -rf "$korebuild_path" || true - fi - return 1 - } -} - -__error() { - echo -e "${RED}$*${RESET}" 1>&2 -} - -__machine_has() { - hash "$1" > /dev/null 2>&1 - return $? -} - -__get_remote_file() { - local remote_path=$1 - local local_path=$2 - - if [[ "$remote_path" != 'http'* ]]; then - cp "$remote_path" "$local_path" - return 0 - fi - - local failed=false - if __machine_has wget; then - wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true - else - failed=true - fi - - if [ "$failed" = true ] && __machine_has curl; then - failed=false - curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true - fi - - if [ "$failed" = true ]; then - __error "Download failed: $remote_path" 1>&2 - return 1 - fi -} - -__read_dom () { local IFS=\> ; read -r -d \< ENTITY CONTENT ;} - -# -# main -# - -while [[ $# -gt 0 ]]; do - case $1 in - -\?|-h|--help) - __usage --no-exit - exit 0 - ;; - -c|--channel|-Channel) - shift - channel="${1:-}" - [ -z "$channel" ] && __usage - ;; - --config-file|-ConfigFile) - shift - config_file="${1:-}" - [ -z "$config_file" ] && __usage - ;; - -d|--dotnet-home|-DotNetHome) - shift - DOTNET_HOME="${1:-}" - [ -z "$DOTNET_HOME" ] && __usage - ;; - --path|-Path) - shift - repo_path="${1:-}" - [ -z "$repo_path" ] && __usage - ;; - -s|--tools-source|-ToolsSource) - shift - tools_source="${1:-}" - [ -z "$tools_source" ] && __usage - ;; - -u|--update|-Update) - update=true - ;; - --verbose|-Verbose) - verbose=true - ;; - --) - shift - break - ;; - *) - break - ;; - esac - shift -done - -if ! __machine_has unzip; then - __error 'Missing required command: unzip' - exit 1 -fi - -if ! __machine_has curl && ! __machine_has wget; then - __error 'Missing required command. Either wget or curl is required.' - exit 1 -fi - -if [ -f "$config_file" ]; then - comment=false - while __read_dom; do - if [ "$comment" = true ]; then [[ $CONTENT == *'-->'* ]] && comment=false ; continue; fi - if [[ $ENTITY == '!--'* ]]; then comment=true; continue; fi - if [ -z "$channel" ] && [[ $ENTITY == "KoreBuildChannel" ]]; then channel=$CONTENT; fi - if [ -z "$tools_source" ] && [[ $ENTITY == "KoreBuildToolsSource" ]]; then tools_source=$CONTENT; fi - done < "$config_file" -fi - -[ -z "$channel" ] && channel='dev' -[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' - -get_korebuild -install_tools "$tools_source" "$DOTNET_HOME" -invoke_repository_build "$repo_path" "$@" +# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) +chmod +x "$DIR/run.sh"; sync +"$DIR/run.sh" default-build "$@" diff --git a/run.cmd b/run.cmd new file mode 100644 index 0000000000..d52d5c7e68 --- /dev/null +++ b/run.cmd @@ -0,0 +1,2 @@ +@ECHO OFF +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE" diff --git a/build.ps1 b/run.ps1 similarity index 73% rename from build.ps1 rename to run.ps1 index d5eb4d5cf2..49c2899856 100644 --- a/build.ps1 +++ b/run.ps1 @@ -3,10 +3,13 @@ <# .SYNOPSIS -Build this repository +Executes KoreBuild commands. .DESCRIPTION -Downloads korebuild if required. Then builds the repository. +Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`. + +.PARAMETER Command +The KoreBuild command to run. .PARAMETER Path The folder to build. Defaults to the folder containing this script. @@ -24,31 +27,32 @@ The base url where build tools can be downloaded. Overrides the value from the c Updates KoreBuild to the latest version even if a lock file is present. .PARAMETER ConfigFile -The path to the configuration file that stores values. Defaults to version.xml. +The path to the configuration file that stores values. Defaults to korebuild.json. -.PARAMETER MSBuildArgs -Arguments to be passed to MSBuild +.PARAMETER Arguments +Arguments to be passed to the command .NOTES This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be. When the lockfile is not present, KoreBuild will create one using latest available version from $Channel. -The $ConfigFile is expected to be an XML file. It is optional, and the configuration values in it are optional as well. +The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set +in the file are overridden by command line parameters. .EXAMPLE Example config file: -```xml - - - - dev - https://aspnetcore.blob.core.windows.net/buildtools - - +```json +{ + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", + "channel": "dev", + "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" +} ``` #> [CmdletBinding(PositionalBinding = $false)] param( + [Parameter(Mandatory=$true, Position = 0)] + [string]$Command, [string]$Path = $PSScriptRoot, [Alias('c')] [string]$Channel, @@ -58,9 +62,9 @@ param( [string]$ToolsSource, [Alias('u')] [switch]$Update, - [string]$ConfigFile = (Join-Path $PSScriptRoot 'version.xml'), + [string]$ConfigFile, [Parameter(ValueFromRemainingArguments = $true)] - [string[]]$MSBuildArgs + [string[]]$Arguments ) Set-StrictMode -Version 2 @@ -147,10 +151,20 @@ function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { # Load configuration or set defaults +$Path = Resolve-Path $Path +if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' } + if (Test-Path $ConfigFile) { - [xml] $config = Get-Content $ConfigFile - if (!($Channel)) { [string] $Channel = Select-Xml -Xml $config -XPath '/Project/PropertyGroup/KoreBuildChannel' } - if (!($ToolsSource)) { [string] $ToolsSource = Select-Xml -Xml $config -XPath '/Project/PropertyGroup/KoreBuildToolsSource' } + try { + $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json + if ($config) { + if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } + if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} + } + } catch { + Write-Warning "$ConfigFile could not be read. Its settings will be ignored." + Write-Warning $Error[0] + } } if (!$DotNetHome) { @@ -169,8 +183,8 @@ $korebuildPath = Get-KoreBuild Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') try { - Install-Tools $ToolsSource $DotNetHome - Invoke-RepositoryBuild $Path @MSBuildArgs + Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile + Invoke-KoreBuildCommand $Command @Arguments } finally { Remove-Module 'KoreBuild' -ErrorAction Ignore diff --git a/run.sh b/run.sh new file mode 100755 index 0000000000..c278423acc --- /dev/null +++ b/run.sh @@ -0,0 +1,223 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# +# variables +# + +RESET="\033[0m" +RED="\033[0;31m" +YELLOW="\033[0;33m" +MAGENTA="\033[0;95m" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" +verbose=false +update=false +repo_path="$DIR" +channel='' +tools_source='' + +# +# Functions +# +__usage() { + echo "Usage: $(basename "${BASH_SOURCE[0]}") command [options] [[--] ...]" + echo "" + echo "Arguments:" + echo " command The command to be run." + echo " ... Arguments passed to the command. Variable number of arguments allowed." + echo "" + echo "Options:" + echo " --verbose Show verbose output." + echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." + echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." + echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." + echo " --path The directory to build. Defaults to the directory containing the script." + echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." + echo " -u|--update Update to the latest KoreBuild even if the lock file is present." + echo "" + echo "Description:" + echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." + echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." + + if [[ "${1:-}" != '--no-exit' ]]; then + exit 2 + fi +} + +get_korebuild() { + local version + local lock_file="$repo_path/korebuild-lock.txt" + if [ ! -f "$lock_file" ] || [ "$update" = true ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" + fi + version="$(grep 'version:*' -m 1 "$lock_file")" + if [[ "$version" == '' ]]; then + __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" + return 1 + fi + version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" + + { + if [ ! -d "$korebuild_path" ]; then + mkdir -p "$korebuild_path" + local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" + tmpfile="$(mktemp)" + echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" + if __get_remote_file "$remote_path" "$tmpfile"; then + unzip -q -d "$korebuild_path" "$tmpfile" + fi + rm "$tmpfile" || true + fi + + source "$korebuild_path/KoreBuild.sh" + } || { + if [ -d "$korebuild_path" ]; then + echo "Cleaning up after failed installation" + rm -rf "$korebuild_path" || true + fi + return 1 + } +} + +__error() { + echo -e "${RED}error: $*${RESET}" 1>&2 +} + +__warn() { + echo -e "${YELLOW}warning: $*${RESET}" +} + +__machine_has() { + hash "$1" > /dev/null 2>&1 + return $? +} + +__get_remote_file() { + local remote_path=$1 + local local_path=$2 + + if [[ "$remote_path" != 'http'* ]]; then + cp "$remote_path" "$local_path" + return 0 + fi + + local failed=false + if __machine_has wget; then + wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true + else + failed=true + fi + + if [ "$failed" = true ] && __machine_has curl; then + failed=false + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true + fi + + if [ "$failed" = true ]; then + __error "Download failed: $remote_path" 1>&2 + return 1 + fi +} + +# +# main +# + +command="${1:-}" +shift + +while [[ $# -gt 0 ]]; do + case $1 in + -\?|-h|--help) + __usage --no-exit + exit 0 + ;; + -c|--channel|-Channel) + shift + channel="${1:-}" + [ -z "$channel" ] && __usage + ;; + --config-file|-ConfigFile) + shift + config_file="${1:-}" + [ -z "$config_file" ] && __usage + if [ ! -f "$config_file" ]; then + __error "Invalid value for --config-file. $config_file does not exist." + exit 1 + fi + ;; + -d|--dotnet-home|-DotNetHome) + shift + DOTNET_HOME="${1:-}" + [ -z "$DOTNET_HOME" ] && __usage + ;; + --path|-Path) + shift + repo_path="${1:-}" + [ -z "$repo_path" ] && __usage + ;; + -s|--tools-source|-ToolsSource) + shift + tools_source="${1:-}" + [ -z "$tools_source" ] && __usage + ;; + -u|--update|-Update) + update=true + ;; + --verbose|-Verbose) + verbose=true + ;; + --) + shift + break + ;; + *) + break + ;; + esac + shift +done + +if ! __machine_has unzip; then + __error 'Missing required command: unzip' + exit 1 +fi + +if ! __machine_has curl && ! __machine_has wget; then + __error 'Missing required command. Either wget or curl is required.' + exit 1 +fi + +[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json" +if [ -f "$config_file" ]; then + if __machine_has jq ; then + if jq '.' "$config_file" >/dev/null ; then + config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" + config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" + else + __warn "$config_file is invalid JSON. Its settings will be ignored." + fi + elif __machine_has python ; then + if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then + config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" + config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" + else + __warn "$config_file is invalid JSON. Its settings will be ignored." + fi + else + __warn 'Missing required command: jq or pyton. Could not parse the JSON file. Its settings will be ignored.' + fi + + [ ! -z "${config_channel:-}" ] && channel="$config_channel" + [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" +fi + +[ -z "$channel" ] && channel='dev' +[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' + +get_korebuild +set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" +invoke_korebuild_command "$command" "$@" From f1e0205b9fedb29f0ea4901caf41acda56bdc597 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Mon, 16 Oct 2017 12:52:49 -0700 Subject: [PATCH 230/291] Add RepositoryRoot --- Directory.Build.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index c5a7a0422f..f543049c1c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,10 +1,11 @@ - + Microsoft ASP.NET Core https://github.com/aspnet/servertests git + $(MSBuildThisFileDirectory) $(VersionSuffix)-$(BuildNumber) true From 20837fe0496f001640689f03a9b41aa483c1a24d Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 1 Nov 2017 16:44:15 -0700 Subject: [PATCH 231/291] Pin tool and package versions to make builds more repeatable Part of aspnet/Universe#575 --- .gitignore | 1 - Directory.Build.props | 8 +++--- Directory.Build.targets | 17 +++-------- NuGet.config | 1 + build/dependencies.props | 28 +++++++++++++++++++ build/repo.props | 8 ++++-- korebuild-lock.txt | 2 ++ korebuild.json | 4 +++ .../ServerComparison.FunctionalTests.csproj | 18 ++++++------ .../ServerComparison.TestSites.csproj | 20 ++++++------- version.props | 10 +++++++ version.xml | 8 ------ 12 files changed, 78 insertions(+), 47 deletions(-) create mode 100644 build/dependencies.props create mode 100644 korebuild-lock.txt create mode 100644 korebuild.json create mode 100644 version.props delete mode 100644 version.xml diff --git a/.gitignore b/.gitignore index f15353fb84..a7760db659 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,3 @@ project.lock.json .testPublish/ .build/ global.json -korebuild-lock.txt diff --git a/Directory.Build.props b/Directory.Build.props index f543049c1c..be33f7fb36 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,17 +1,17 @@ - - + + + Microsoft ASP.NET Core https://github.com/aspnet/servertests git $(MSBuildThisFileDirectory) - $(VersionSuffix)-$(BuildNumber) true - + diff --git a/Directory.Build.targets b/Directory.Build.targets index bc118fd907..e83ff95e39 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,14 +1,5 @@ - - - - <_BootstrapperFile Condition=" $([MSBuild]::IsOSUnixLike()) ">build.sh - <_BootstrapperFile Condition="! $([MSBuild]::IsOSUnixLike()) ">build.cmd - <_BootstrapperError> - Package references have not been pinned. Run './$(_BootstrapperFile) /t:Pin'. - Also, you can run './$(_BootstrapperFile) /t:Restore' which will pin *and* restore packages. '$(_BootstrapperFile)' can be found in '$(MSBuildThisFileDirectory)'. - - - - - + + + $(MicrosoftNETCoreApp20PackageVersion) + diff --git a/NuGet.config b/NuGet.config index 20060c934e..4e8a1f6de1 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,6 +3,7 @@ + diff --git a/build/dependencies.props b/build/dependencies.props new file mode 100644 index 0000000000..2b41ee0efe --- /dev/null +++ b/build/dependencies.props @@ -0,0 +1,28 @@ + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + 2.1.0-preview1-15550 + 1.0.0-pre-10141 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 0.5.0-preview1-27498 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 2.1.0-preview1-27498 + 2.0.0 + 2.1.0-preview1-27498 + 15.3.0 + 1.4.0 + 3.2.0 + 2.3.0 + 2.3.0 + + + diff --git a/build/repo.props b/build/repo.props index 4d0930d3a1..31d65d4082 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,7 +1,11 @@  - - + + + + Internal.AspNetCore.Universe.Lineup + https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json + diff --git a/korebuild-lock.txt b/korebuild-lock.txt new file mode 100644 index 0000000000..36d8056037 --- /dev/null +++ b/korebuild-lock.txt @@ -0,0 +1,2 @@ +version:2.1.0-preview1-15550 +commithash:0dd080d0d87b4d1966ec0af9961dc8bacc04f84f diff --git a/korebuild.json b/korebuild.json new file mode 100644 index 0000000000..bd5d51a51b --- /dev/null +++ b/korebuild.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", + "channel": "dev" +} diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 219f3ac2ba..4fa826e56a 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -10,15 +10,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index a70b73f84b..7053d7b69a 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -7,16 +7,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/version.props b/version.props new file mode 100644 index 0000000000..5c4a7c32d1 --- /dev/null +++ b/version.props @@ -0,0 +1,10 @@ + + + 2.1.0 + preview1 + $(VersionPrefix) + $(VersionPrefix)-$(VersionSuffix)-final + t000 + $(VersionSuffix)-$(BuildNumber) + + diff --git a/version.xml b/version.xml deleted file mode 100644 index 3c05022b7d..0000000000 --- a/version.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - dev - 2.1.0 - preview1 - - From c14ef1a7a6b2138f02d62eefa0c2af32b57c2887 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Mon, 13 Nov 2017 11:47:28 -0800 Subject: [PATCH 232/291] Disabling tests until file path issues are resolved. (#97) --- .../HelloWorldTest.cs | 2 +- .../NtlmAuthenticationTest.cs | 4 ++-- .../ResponseCompressionTests.cs | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 034074cf2a..4db87d05c0 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -23,7 +23,7 @@ namespace ServerComparison.FunctionalTests [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)] + [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)] diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 9de2e35a04..2cb20f4370 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -26,10 +26,10 @@ namespace 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)] + [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)] + [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) { var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 79195aa887..c1c70a670e 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -33,7 +33,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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) { @@ -60,8 +60,8 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [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) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); @@ -79,7 +79,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + [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) { @@ -106,8 +106,8 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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) { return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); From 527a6dc97a3fe4f7d69e9262c3f1cf0c470336b4 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 15 Nov 2017 15:54:25 -0800 Subject: [PATCH 233/291] Update samples and tests to target netcoreapp2.1 --- Directory.Build.props | 4 ++ korebuild-lock.txt | 4 +- test/Directory.Build.props | 10 ++++ .../NtlmAuthenticationTest.cs | 2 +- .../ResponseTests.cs | 46 +++++++++++-------- .../ServerComparison.FunctionalTests.csproj | 3 +- .../ServerComparison.TestSites.csproj | 3 +- 7 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 test/Directory.Build.props diff --git a/Directory.Build.props b/Directory.Build.props index be33f7fb36..974ca8e612 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,4 +1,8 @@  + + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 36d8056037..95f4613014 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15550 -commithash:0dd080d0d87b4d1966ec0af9961dc8bacc04f84f +version:2.1.0-preview1-15567 +commithash:903e3104807b1bb8cddd28bdef205b1e2dc021d1 diff --git a/test/Directory.Build.props b/test/Directory.Build.props new file mode 100644 index 0000000000..b6b79cae3b --- /dev/null +++ b/test/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + netcoreapp2.1 + $(DeveloperBuildTestTfms) + netcoreapp2.1;netcoreapp2.0 + $(StandardTestTfms);net461 + + diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 2cb20f4370..12649aa148 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -104,7 +104,7 @@ namespace ServerComparison.FunctionalTests } } } -#elif NETCOREAPP2_0 +#elif NETCOREAPP2_0 || NETCOREAPP2_1 #else #error target frameworks need to be updated #endif diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 8636f2f380..b2a3accdc8 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -24,15 +24,15 @@ namespace ServerComparison.FunctionalTests { } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [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,9 +51,8 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [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,15 +60,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] + + [Theory] [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)] @@ -87,15 +86,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [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)] @@ -114,15 +113,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [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)] @@ -141,15 +140,15 @@ namespace ServerComparison.FunctionalTests return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] +#if NET461 + [Theory] // [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)] @@ -161,6 +160,17 @@ namespace ServerComparison.FunctionalTests private async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func 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)) { diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index 4fa826e56a..fb1f789be3 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,8 +1,7 @@  - netcoreapp2.0;net461 - netcoreapp2.0 + $(StandardTestTfms) diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 7053d7b69a..54cc960912 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -1,8 +1,7 @@  - net461;netcoreapp2.0 - netcoreapp2.0 + $(StandardTestTfms) win7-x86;win7-x64;linux-x64;osx-x64 From cf64cf2c4a5563665b646f332887a7e6a67939d4 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 15 Nov 2017 18:00:01 -0800 Subject: [PATCH 234/291] Update samples and tests to target netcoreapp2.1 --- build/dependencies.props | 24 ++++----- test/Directory.Build.props | 3 +- .../HelloWorldTest.cs | 15 ++++-- .../Helpers.cs | 25 +++++++++ .../NtlmAuthenticationTest.cs | 16 +++--- .../ResponseCompressionTests.cs | 54 ++++++++++++------- .../ResponseTests.cs | 47 ++++++---------- 7 files changed, 108 insertions(+), 76 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 2b41ee0efe..d37bc43e7c 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,19 +5,19 @@ 2.1.0-preview1-15550 1.0.0-pre-10141 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 - 0.5.0-preview1-27498 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 - 2.1.0-preview1-27498 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 + 0.5.0-preview1-27595 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 + 2.1.0-preview1-27595 2.0.0 - 2.1.0-preview1-27498 + 2.1.0-preview1-27595 15.3.0 1.4.0 3.2.0 diff --git a/test/Directory.Build.props b/test/Directory.Build.props index b6b79cae3b..620b803d21 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -2,9 +2,8 @@ - netcoreapp2.1 + netcoreapp2.1;netcoreapp2.0 $(DeveloperBuildTestTfms) - netcoreapp2.1;netcoreapp2.0 $(StandardTestTfms);net461 diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 4db87d05c0..2febca4269 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -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 }; diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 68f9e62c08..4086cb8232 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -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}"); + } } } \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 12649aa148..fe74296449 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -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 }; diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index c1c70a670e..4ab6246809 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -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 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 ReadCompressedAsStringAsync(HttpContent content) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index b2a3accdc8..fb327afaf8 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -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 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 }; From a71b3f787befa6e13527c12a21c985f18ebcac5b Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 16 Nov 2017 14:48:02 -0800 Subject: [PATCH 235/291] Revert "Disabling tests until file path issues are resolved. (#97)" (#99) --- build/dependencies.props | 26 +++++++++---------- .../HelloWorldTest.cs | 2 +- .../NtlmAuthenticationTest.cs | 6 ++--- .../ResponseCompressionTests.cs | 13 +++++----- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index d37bc43e7c..662247a1df 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,20 +4,20 @@ 2.1.0-preview1-15550 - 1.0.0-pre-10141 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 - 0.5.0-preview1-27595 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 - 2.1.0-preview1-27595 + 1.0.0-pre-10202 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 + 0.5.0-preview1-27602 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 + 2.1.0-preview1-27602 2.0.0 - 2.1.0-preview1-27595 + 2.1.0-preview1-27602 15.3.0 1.4.0 3.2.0 diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 2febca4269..59688e0b5d 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -21,7 +21,7 @@ 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.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [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) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index fe74296449..6a0584065f 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -25,9 +25,9 @@ namespace ServerComparison.FunctionalTests [Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [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.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable)] [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)] diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 4ab6246809..c84a9110f2 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -32,7 +32,7 @@ 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.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -56,7 +56,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_HostCompression() @@ -64,7 +64,8 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact] + [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_HostCompression_CLR() @@ -88,7 +89,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: false); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppCompression() @@ -113,7 +114,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppAndHostCompression() @@ -121,7 +122,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Standalone, hostCompression: true); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact] [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] public Task ResponseCompression_Windows_AppAndHostCompression_CLR() { From b9f970091aaa248d80b12deae2df7894b1461210 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 17 Nov 2017 13:00:26 -0800 Subject: [PATCH 236/291] Use MicrosoftNETCoreApp21PackageVersion to determine the runtime framework in netcoreapp2.1 --- Directory.Build.targets | 1 + build/dependencies.props | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index e83ff95e39..894b1d0cf8 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,6 @@  $(MicrosoftNETCoreApp20PackageVersion) + $(MicrosoftNETCoreApp21PackageVersion) diff --git a/build/dependencies.props b/build/dependencies.props index 662247a1df..d5bd5f8d43 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -17,6 +17,7 @@ 2.1.0-preview1-27602 2.1.0-preview1-27602 2.0.0 + 2.1.0-preview1-25907-02 2.1.0-preview1-27602 15.3.0 1.4.0 From 88ce3b870e21c38f2b2e93730a972c3c4b8662f7 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 20 Nov 2017 12:18:36 -0800 Subject: [PATCH 237/291] Use MSBuild to set NuGet feeds instead of NuGet.config --- Directory.Build.props | 1 + NuGet.config | 4 +--- build/sources.props | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 build/sources.props diff --git a/Directory.Build.props b/Directory.Build.props index 974ca8e612..fc93574bae 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,6 +5,7 @@ + Microsoft ASP.NET Core diff --git a/NuGet.config b/NuGet.config index 4e8a1f6de1..e32bddfd51 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,8 +2,6 @@ - - - + diff --git a/build/sources.props b/build/sources.props new file mode 100644 index 0000000000..c03f3ddb60 --- /dev/null +++ b/build/sources.props @@ -0,0 +1,16 @@ + + + + + $(DotNetRestoreSources) + + $(RestoreSources); + https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; + + + $(RestoreSources); + https://api.nuget.org/v3/index.json; + + + From 9fc47088d06b4c33f44c3b9770e3188ca845fa26 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 21 Nov 2017 15:48:58 -0800 Subject: [PATCH 238/291] Replace aspnetcore-ci-dev feed with aspnetcore-dev --- build/dependencies.props | 28 ++++++++++++++-------------- build/repo.props | 2 +- build/sources.props | 2 +- korebuild-lock.txt | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index d5bd5f8d43..a0b1cbddfc 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,24 +1,24 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview1-15550 + 2.1.0-preview1-15576 1.0.0-pre-10202 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 - 0.5.0-preview1-27602 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 - 2.1.0-preview1-27602 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 + 0.5.0-preview1-27644 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 + 2.1.0-preview1-27644 2.0.0 2.1.0-preview1-25907-02 - 2.1.0-preview1-27602 + 2.1.0-preview1-27644 15.3.0 1.4.0 3.2.0 diff --git a/build/repo.props b/build/repo.props index 31d65d4082..748bdbf8db 100644 --- a/build/repo.props +++ b/build/repo.props @@ -6,6 +6,6 @@ Internal.AspNetCore.Universe.Lineup - https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json diff --git a/build/sources.props b/build/sources.props index c03f3ddb60..9feff29d09 100644 --- a/build/sources.props +++ b/build/sources.props @@ -5,7 +5,7 @@ $(DotNetRestoreSources) $(RestoreSources); - https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 95f4613014..1a99066b7c 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15567 -commithash:903e3104807b1bb8cddd28bdef205b1e2dc021d1 +version:2.1.0-preview1-15576 +commithash:2f3856d2ba4f659fcb9253215b83946a06794a27 From bf7a0a9c8b7fa94d3d5b56b82e21c7af98701457 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 29 Nov 2017 14:09:30 -0800 Subject: [PATCH 239/291] Specify runtime versions to install --- build/repo.props | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/repo.props b/build/repo.props index 748bdbf8db..84d4aa4851 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,11 +1,17 @@  + + - Internal.AspNetCore.Universe.Lineup https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json + + + + + From 0eca077e5e0ad20958cc65d139ddc20feac409ce Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Fri, 1 Dec 2017 10:27:21 -0800 Subject: [PATCH 240/291] Update bootstrappers --- run.ps1 | 17 +++++++++++------ run.sh | 30 +++++++++++++++++++----------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/run.ps1 b/run.ps1 index 49c2899856..27dcf848f8 100644 --- a/run.ps1 +++ b/run.ps1 @@ -29,6 +29,9 @@ Updates KoreBuild to the latest version even if a lock file is present. .PARAMETER ConfigFile The path to the configuration file that stores values. Defaults to korebuild.json. +.PARAMETER ToolsSourceSuffix +The Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores. + .PARAMETER Arguments Arguments to be passed to the command @@ -51,7 +54,7 @@ Example config file: #> [CmdletBinding(PositionalBinding = $false)] param( - [Parameter(Mandatory=$true, Position = 0)] + [Parameter(Mandatory = $true, Position = 0)] [string]$Command, [string]$Path = $PSScriptRoot, [Alias('c')] @@ -63,6 +66,7 @@ param( [Alias('u')] [switch]$Update, [string]$ConfigFile, + [string]$ToolsSourceSuffix, [Parameter(ValueFromRemainingArguments = $true)] [string[]]$Arguments ) @@ -79,7 +83,7 @@ function Get-KoreBuild { $lockFile = Join-Path $Path 'korebuild-lock.txt' if (!(Test-Path $lockFile) -or $Update) { - Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile + Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile $ToolsSourceSuffix } $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 @@ -96,7 +100,7 @@ function Get-KoreBuild { try { $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" - Get-RemoteFile $remotePath $tmpfile + Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix if (Get-Command -Name 'Expand-Archive' -ErrorAction Ignore) { # Use built-in commands where possible as they are cross-plat compatible Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath @@ -124,7 +128,7 @@ function Join-Paths([string]$path, [string[]]$childPaths) { return $path } -function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { +function Get-RemoteFile([string]$RemotePath, [string]$LocalPath, [string]$RemoteSuffix) { if ($RemotePath -notlike 'http*') { Copy-Item $RemotePath $LocalPath return @@ -134,7 +138,7 @@ function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { while ($retries -gt 0) { $retries -= 1 try { - Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath + Invoke-WebRequest -UseBasicParsing -Uri $($RemotePath + $RemoteSuffix) -OutFile $LocalPath return } catch { @@ -161,7 +165,8 @@ if (Test-Path $ConfigFile) { if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} } - } catch { + } + catch { Write-Warning "$ConfigFile could not be read. Its settings will be ignored." Write-Warning $Error[0] } diff --git a/run.sh b/run.sh index c278423acc..834961fc3a 100755 --- a/run.sh +++ b/run.sh @@ -17,6 +17,7 @@ update=false repo_path="$DIR" channel='' tools_source='' +tools_source_suffix='' # # Functions @@ -29,13 +30,14 @@ __usage() { echo " ... Arguments passed to the command. Variable number of arguments allowed." echo "" echo "Options:" - echo " --verbose Show verbose output." - echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." - echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." - echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." - echo " --path The directory to build. Defaults to the directory containing the script." - echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." - echo " -u|--update Update to the latest KoreBuild even if the lock file is present." + echo " --verbose Show verbose output." + echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." + echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." + echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." + echo " --path The directory to build. Defaults to the directory containing the script." + echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." + echo " --tools-source-suffix|-ToolsSourceSuffix The suffix to append to tools-source. Useful for query strings." + echo " -u|--update Update to the latest KoreBuild even if the lock file is present." echo "" echo "Description:" echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." @@ -50,7 +52,7 @@ get_korebuild() { local version local lock_file="$repo_path/korebuild-lock.txt" if [ ! -f "$lock_file" ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" "$tools_source_suffix" fi version="$(grep 'version:*' -m 1 "$lock_file")" if [[ "$version" == '' ]]; then @@ -66,7 +68,7 @@ get_korebuild() { local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" tmpfile="$(mktemp)" echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" - if __get_remote_file "$remote_path" "$tmpfile"; then + if __get_remote_file "$remote_path" "$tmpfile" "$tools_source_suffix"; then unzip -q -d "$korebuild_path" "$tmpfile" fi rm "$tmpfile" || true @@ -98,6 +100,7 @@ __machine_has() { __get_remote_file() { local remote_path=$1 local local_path=$2 + local remote_path_suffix=$3 if [[ "$remote_path" != 'http'* ]]; then cp "$remote_path" "$local_path" @@ -106,14 +109,14 @@ __get_remote_file() { local failed=false if __machine_has wget; then - wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true + wget --tries 10 --quiet -O "$local_path" "${remote_path}${remote_path_suffix}" || failed=true else failed=true fi if [ "$failed" = true ] && __machine_has curl; then failed=false - curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "${remote_path}${remote_path_suffix}" || failed=true fi if [ "$failed" = true ]; then @@ -164,6 +167,11 @@ while [[ $# -gt 0 ]]; do tools_source="${1:-}" [ -z "$tools_source" ] && __usage ;; + --tools-source-suffix|-ToolsSourceSuffix) + shift + tools_source_suffix="${1:-}" + [ -z "$tools_source_suffix" ] && __usage + ;; -u|--update|-Update) update=true ;; From a7a850a967af2ecc3c58c8cae7e1b3c7e4d81375 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 10 Dec 2017 13:48:59 -0800 Subject: [PATCH 241/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 34 +++++++++++++++++----------------- korebuild-lock.txt | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index a0b1cbddfc..84b55e4e50 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,27 +3,27 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview1-15576 - 1.0.0-pre-10202 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 - 0.5.0-preview1-27644 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 - 2.1.0-preview1-27644 + 2.1.0-preview1-15618 + 1.0.0-pre-10223 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 + 0.5.0-preview1-27773 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 + 2.1.0-preview1-27773 2.0.0 - 2.1.0-preview1-25907-02 - 2.1.0-preview1-27644 + 2.1.0-preview1-25915-01 + 2.1.0-preview1-27773 15.3.0 1.4.0 3.2.0 - 2.3.0 - 2.3.0 + 2.3.1 + 2.3.1 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 1a99066b7c..e7cce93009 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15576 -commithash:2f3856d2ba4f659fcb9253215b83946a06794a27 +version:2.1.0-preview1-15618 +commithash:00ce1383114015fe89b221146036e59e6bc11219 From c0306b2d08ee852b3c5c89a832c83eb715a797f6 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Wed, 13 Dec 2017 21:43:20 +0000 Subject: [PATCH 242/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 84b55e4e50..af05b3e0c6 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview1-15618 + 2.1.0-preview1-15626 1.0.0-pre-10223 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 - 0.5.0-preview1-27773 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 - 2.1.0-preview1-27773 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 + 0.5.0-preview1-27807 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 + 2.1.0-preview1-27807 2.0.0 - 2.1.0-preview1-25915-01 - 2.1.0-preview1-27773 + 2.1.0-preview1-26008-01 + 2.1.0-preview1-27807 15.3.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index e7cce93009..8d52a6128c 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15618 -commithash:00ce1383114015fe89b221146036e59e6bc11219 +version:2.1.0-preview1-15626 +commithash:fd6410e9c90c428bc01238372303ad09cb9ec889 From 27cd5b3a2fd8d5f98a63bd80c16d4288fe7e0324 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 18 Dec 2017 17:57:19 -0800 Subject: [PATCH 243/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index af05b3e0c6..995834d893 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,20 +5,20 @@ 2.1.0-preview1-15626 1.0.0-pre-10223 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 - 0.5.0-preview1-27807 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 - 2.1.0-preview1-27807 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 + 0.5.0-preview1-27849 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 + 2.1.0-preview1-27849 2.0.0 - 2.1.0-preview1-26008-01 - 2.1.0-preview1-27807 + 2.1.0-preview1-26016-05 + 2.1.0-preview1-27849 15.3.0 1.4.0 3.2.0 From 98a84a58e1c237e7baa2bda0059a93c21778fa49 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 4 Jan 2018 02:07:01 +0000 Subject: [PATCH 244/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 995834d893..679d55b701 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview1-15626 - 1.0.0-pre-10223 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 - 0.5.0-preview1-27849 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 - 2.1.0-preview1-27849 + 2.1.0-preview1-15651 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 0.5.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 + 2.1.0-preview1-27965 2.0.0 2.1.0-preview1-26016-05 - 2.1.0-preview1-27849 + 2.1.0-preview1-27965 15.3.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 8d52a6128c..7c2e97aa79 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15626 -commithash:fd6410e9c90c428bc01238372303ad09cb9ec889 +version:2.1.0-preview1-15651 +commithash:ebf2365121c2c6a6a0fbfa9b0f37bb5effc89323 From 6a928fbe733852c7e4ad5df9f9e11b4e2f8da165 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 4 Jan 2018 12:38:37 -0800 Subject: [PATCH 245/291] Disabling tests due to 400 status code issues (#101) --- .../HelloWorldTest.cs | 2 +- .../NtlmAuthenticationTest.cs | 2 +- .../ResponseCompressionTests.cs | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 59688e0b5d..2febca4269 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -21,7 +21,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 6a0584065f..685c6d0a06 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -27,7 +27,7 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.MacOSX)] [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")] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable)] + [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)] diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index c84a9110f2..f397739a85 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -32,7 +32,7 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [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) { @@ -56,7 +56,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact] + [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_HostCompression() @@ -64,7 +64,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true); } - [ConditionalFact] + [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] @@ -89,7 +89,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: false); } - [ConditionalFact] + [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppCompression() @@ -114,7 +114,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact] + [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppAndHostCompression() @@ -122,7 +122,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Standalone, hostCompression: true); } - [ConditionalFact] + [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] public Task ResponseCompression_Windows_AppAndHostCompression_CLR() { From f269f6b7298a75538144a123bb2c1e2df56b134f Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 4 Jan 2018 16:58:12 -0800 Subject: [PATCH 246/291] Make M.A.AspNetCoreModule a package dependency only on windows (#102) --- .../ServerComparison.TestSites.csproj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 54cc960912..48cbaaf1c4 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -5,8 +5,11 @@ win7-x86;win7-x64;linux-x64;osx-x64 - + + + + From 50db8324099b6afb247b844ba67da4ede469904e Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sat, 6 Jan 2018 15:33:21 -0800 Subject: [PATCH 247/291] Update dependencies.props [auto-updated: dependencies] --- korebuild-lock.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 7c2e97aa79..2146d006d7 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15651 -commithash:ebf2365121c2c6a6a0fbfa9b0f37bb5effc89323 +version:2.1.0-preview1-15661 +commithash:c9349d4c8a495d3085d9b879214d80f2f45e2193 From 0ca78b89c53bb3680ff0fdbc93b772de28267fce Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 23 Jan 2018 15:32:53 -0800 Subject: [PATCH 248/291] Branching for 2.1.0-preview1 --- build/dependencies.props | 30 +++++++++++++++--------------- build/repo.props | 4 ++-- build/sources.props | 4 ++-- korebuild-lock.txt | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 679d55b701..31e80beb06 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview1-15651 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 0.5.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 + 2.1.0-preview1-15679 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 0.5.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 + 2.1.0-preview1-28153 2.0.0 - 2.1.0-preview1-26016-05 - 2.1.0-preview1-27965 + 2.1.0-preview1-26115-03 + 2.1.0-preview1-28153 15.3.0 1.4.0 3.2.0 diff --git a/build/repo.props b/build/repo.props index 84d4aa4851..b398b64bcb 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,4 +1,4 @@ - + @@ -7,7 +7,7 @@ Internal.AspNetCore.Universe.Lineup - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json + https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json diff --git a/build/sources.props b/build/sources.props index 9feff29d09..5d66393335 100644 --- a/build/sources.props +++ b/build/sources.props @@ -1,11 +1,11 @@ - + $(DotNetRestoreSources) $(RestoreSources); - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 2146d006d7..a474bc0e35 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15661 -commithash:c9349d4c8a495d3085d9b879214d80f2f45e2193 +version:2.1.0-preview1-15679 +commithash:5347461137cb45a77ddcc0b55b2478092de43338 From 5110f8641aac5ba0971204e168dd2f4b85f5744d Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 24 Jan 2018 15:00:29 -0800 Subject: [PATCH 249/291] Updating version to preview2 --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 5c4a7c32d1..370d5ababd 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.1.0 - preview1 + preview2 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From 151b58bd77b4771dc5e1a4ab19c5003e795f64d6 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 31 Jan 2018 15:01:13 -0800 Subject: [PATCH 250/291] Update dependencies.props to 2.1.0-preview-28193, build tools to 2.1.0-preview1-1010 [ci skip] Scripted changes: - updated travis and appveyor.yml files to only build dev, ci, and release branches - updated dependencies.props - updated korebuild-lock.txt - updated korebuild.json to release/2.1 channel --- .appveyor.yml | 15 +++++++-------- .travis.yml | 25 +++++++++++++------------ build/dependencies.props | 30 +++++++++++++++--------------- korebuild-lock.txt | 4 ++-- korebuild.json | 4 ++-- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index e843bad987..1de903ee67 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,18 +1,17 @@ init: - - git config --global core.autocrlf true +- git config --global core.autocrlf true branches: only: - - master - - release - - dev - - /^(.*\/)?ci-.*$/ + - dev + - /^release\/.*$/ + - /^(.*\/)?ci-.*$/ environment: global: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: 1 build_script: - - ps: .\run.ps1 default-build +- ps: .\run.ps1 default-build clone_depth: 1 -test: off -deploy: off +test: 'off' +deploy: 'off' os: Visual Studio 2017 diff --git a/.travis.yml b/.travis.yml index dbf444ca98..97e1455db8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,26 +3,27 @@ sudo: required dist: trusty env: global: - - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - - DOTNET_CLI_TELEMETRY_OPTOUT: 1 + - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + - DOTNET_CLI_TELEMETRY_OPTOUT: 1 addons: apt: packages: - - libunwind8 + - libunwind8 mono: none os: - - linux - - osx +- linux +- osx osx_image: xcode8.2 branches: only: - - master - - release - - dev - - /^(.*\/)?ci-.*$/ + - dev + - /^release\/.*$/ + - /^(.*\/)?ci-.*$/ before_install: - - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl nginx; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; else ./install-nginx.sh; fi +- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl nginx; + ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib + /usr/local/lib/; else ./install-nginx.sh; fi install: - - export PATH="$PATH:$HOME/nginxinstall/sbin/" +- export PATH="$PATH:$HOME/nginxinstall/sbin/" script: - - ./build.sh +- ./build.sh diff --git a/build/dependencies.props b/build/dependencies.props index 31e80beb06..b846917a02 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview1-15679 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 0.5.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 - 2.1.0-preview1-28153 + 2.1.0-preview1-1010 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 0.5.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 + 2.1.0-preview1-28193 2.0.0 - 2.1.0-preview1-26115-03 - 2.1.0-preview1-28153 + 2.1.0-preview1-26122-01 + 2.1.0-preview1-28193 15.3.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index a474bc0e35..851bfbf203 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15679 -commithash:5347461137cb45a77ddcc0b55b2478092de43338 +version:2.1.0-preview1-1010 +commithash:75ca924dfbd673c38841025b04c4dcd93b84f56d diff --git a/korebuild.json b/korebuild.json index bd5d51a51b..678d8bb948 100644 --- a/korebuild.json +++ b/korebuild.json @@ -1,4 +1,4 @@ { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev" + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.1/tools/korebuild.schema.json", + "channel": "release/2.1" } From d76b2d86e6c928c3149f7c9c4023bd9ce330216a Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 1 Feb 2018 04:32:00 +0000 Subject: [PATCH 251/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 30 +++++++++++++++--------------- korebuild-lock.txt | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 679d55b701..2e6ea5e7d5 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview1-15651 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 0.5.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 - 2.1.0-preview1-27965 + 2.1.0-preview2-15692 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 0.5.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 + 2.1.0-preview2-28215 2.0.0 - 2.1.0-preview1-26016-05 - 2.1.0-preview1-27965 + 2.1.0-preview2-26130-04 + 2.1.0-preview2-28215 15.3.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 2146d006d7..232cb858c2 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15661 -commithash:c9349d4c8a495d3085d9b879214d80f2f45e2193 +version:2.1.0-preview2-15692 +commithash:5d9f445ce3f8492451a6f461df7e739bbed6a7f8 From bd37e56367259f03c730fb75eefc790bd51a9edf Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sat, 3 Feb 2018 03:03:51 +0000 Subject: [PATCH 252/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 2e6ea5e7d5..aaa57fb4f3 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15692 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 0.5.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 - 2.1.0-preview2-28215 + 2.1.0-preview2-15694 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 0.5.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 + 2.1.0-preview2-30020 2.0.0 2.1.0-preview2-26130-04 - 2.1.0-preview2-28215 + 2.1.0-preview2-30020 15.3.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 232cb858c2..6f294ef0e6 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15692 -commithash:5d9f445ce3f8492451a6f461df7e739bbed6a7f8 +version:2.1.0-preview2-15694 +commithash:f61af02b48e89592c9aadb7ebaebe84228666c3b From 6d738df09ffd99f5227ca08a8130892558cd80f9 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Fri, 9 Feb 2018 12:01:06 -0800 Subject: [PATCH 253/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index aaa57fb4f3..95b5750e64 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15694 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 0.5.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 - 2.1.0-preview2-30020 + 2.1.0-preview2-15698 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 0.5.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 + 2.1.0-preview2-30066 2.0.0 2.1.0-preview2-26130-04 - 2.1.0-preview2-30020 + 2.1.0-preview2-30066 15.3.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 6f294ef0e6..3e2b56b91b 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15694 -commithash:f61af02b48e89592c9aadb7ebaebe84228666c3b +version:2.1.0-preview2-15698 +commithash:7216e5068cb1957e09d45fcbe58a744dd5c2de73 From 79a74aa22777bf3b232213f422b9b2c65c488af3 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 11 Feb 2018 12:41:41 -0800 Subject: [PATCH 254/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 95b5750e64..aafa3d6536 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,26 +4,26 @@ 2.1.0-preview2-15698 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 0.5.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 - 2.1.0-preview2-30066 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 0.5.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 + 2.1.0-preview2-30077 2.0.0 2.1.0-preview2-26130-04 - 2.1.0-preview2-30066 + 2.1.0-preview2-30077 15.3.0 1.4.0 3.2.0 2.3.1 - 2.3.1 + 2.4.0-beta.1.build3945 From 79152dd91019c909ebb80035a3b93f7a549ba66b Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 18 Feb 2018 12:32:15 -0800 Subject: [PATCH 255/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index aafa3d6536..e6ce8df972 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15698 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 0.5.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 - 2.1.0-preview2-30077 + 2.1.0-preview2-15707 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 0.5.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 + 2.1.0-preview2-30131 2.0.0 2.1.0-preview2-26130-04 - 2.1.0-preview2-30077 + 2.1.0-preview2-30131 15.3.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 3e2b56b91b..89d0ad3d15 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15698 -commithash:7216e5068cb1957e09d45fcbe58a744dd5c2de73 +version:2.1.0-preview2-15707 +commithash:e74e53f129ab34332947fea7ac7b7591b027cb22 From e86310835a1c71a9f4e9a074e47932127f7e885e Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 21 Feb 2018 18:27:14 -0800 Subject: [PATCH 256/291] Use FeatureBranchVersionSuffix when generating VersionSuffix --- version.props | 1 + 1 file changed, 1 insertion(+) diff --git a/version.props b/version.props index 370d5ababd..65c8a07e37 100644 --- a/version.props +++ b/version.props @@ -5,6 +5,7 @@ $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 + $(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) $(VersionSuffix)-$(BuildNumber) From eef15e4d37081e52b76ad7b1ed82dd0e59f69a1a Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 26 Feb 2018 11:16:12 -0800 Subject: [PATCH 257/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 30 +++++++++++++++--------------- korebuild-lock.txt | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e6ce8df972..bc3ef4a1fc 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,23 +3,23 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15707 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 0.5.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 - 2.1.0-preview2-30131 + 2.1.0-preview2-15721 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 0.5.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 + 2.1.0-preview2-30187 2.0.0 2.1.0-preview2-26130-04 - 2.1.0-preview2-30131 - 15.3.0 + 2.1.0-preview2-30187 + 15.6.0 1.4.0 3.2.0 2.3.1 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 89d0ad3d15..e6c7fddffa 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15707 -commithash:e74e53f129ab34332947fea7ac7b7591b027cb22 +version:2.1.0-preview2-15721 +commithash:f9bb4be59e39938ec59a6975257e26099b0d03c1 From 99b38e40d3caef5068cb3c2df41c06448cb717a1 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 6 Mar 2018 10:06:06 -0800 Subject: [PATCH 258/291] Use dotnet-core feed in repos --- build/sources.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/sources.props b/build/sources.props index 9feff29d09..9215df9751 100644 --- a/build/sources.props +++ b/build/sources.props @@ -1,10 +1,11 @@ - + $(DotNetRestoreSources) $(RestoreSources); + https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; From d5cc62c831363d34e884039124371b40e785e4b9 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 6 Mar 2018 10:06:06 -0800 Subject: [PATCH 259/291] Prepend FeatureBranchVersionPrefix if FeatureBranchVersionSuffix is specified --- version.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/version.props b/version.props index 65c8a07e37..a11ea1ed52 100644 --- a/version.props +++ b/version.props @@ -5,7 +5,8 @@ $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 - $(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) + a- + $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) $(VersionSuffix)-$(BuildNumber) From 27fe94aca4e7cc52c574cf7a3e2e61156ef35350 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 8 Mar 2018 13:14:50 -0800 Subject: [PATCH 260/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 30 +++++++++++++++--------------- korebuild-lock.txt | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index bc3ef4a1fc..3579c59fdd 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15721 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 0.5.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 - 2.1.0-preview2-30187 + 2.1.0-preview2-15728 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 0.5.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 + 2.1.0-preview2-30272 2.0.0 - 2.1.0-preview2-26130-04 - 2.1.0-preview2-30187 + 2.1.0-preview2-26225-03 + 2.1.0-preview2-30272 15.6.0 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index e6c7fddffa..138d848db1 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15721 -commithash:f9bb4be59e39938ec59a6975257e26099b0d03c1 +version:2.1.0-preview2-15728 +commithash:393377068ddcf51dfee0536536d455f57a828b06 From f528cf96ba1826c6b232dbefbc95252d0b5f1020 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Fri, 9 Mar 2018 20:32:11 -0800 Subject: [PATCH 261/291] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 97e1455db8..d7b744fc46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ mono: none os: - linux - osx -osx_image: xcode8.2 +osx_image: xcode9.3beta branches: only: - dev From 20997d1fc043b8d6784134b3d97af3bfb1cca690 Mon Sep 17 00:00:00 2001 From: Chris R Date: Fri, 9 Mar 2018 21:29:56 -0800 Subject: [PATCH 262/291] Upgrade deps --- build/dependencies.props | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3579c59fdd..ce0b3c16d3 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,21 +4,21 @@ 2.1.0-preview2-15728 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 0.5.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 - 2.1.0-preview2-30272 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 0.5.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 + 2.1.0-preview2-30285 2.0.0 - 2.1.0-preview2-26225-03 - 2.1.0-preview2-30272 + 2.1.0-preview2-26308-01 + 2.1.0-preview2-30285 15.6.0 1.4.0 3.2.0 From 13aa0ae51383ce995cac0663d977916d0eeb369a Mon Sep 17 00:00:00 2001 From: Chris R Date: Fri, 9 Mar 2018 21:45:50 -0800 Subject: [PATCH 263/291] Force HTTP/1.1 --- .../ResponseTests.cs | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index fb327afaf8..aad5295388 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -200,7 +200,12 @@ namespace ServerComparison.FunctionalTests private static async Task CheckContentLengthAsync(HttpClient client, ILogger logger) { logger.LogInformation("Testing ContentLength"); - var response = await client.GetAsync("contentlength"); + var requestMessage = new HttpRequestMessage(HttpMethod.Get, "contentlength") + { + Version = new Version(1, 1) + }; + + var response = await client.SendAsync(requestMessage); var responseText = await response.Content.ReadAsStringAsync(); try { @@ -265,7 +270,12 @@ namespace ServerComparison.FunctionalTests private static async Task CheckChunkedAsync(HttpClient client, ILogger logger) { logger.LogInformation("Testing Chunked"); - var response = await client.GetAsync("chunked"); + var requestMessage = new HttpRequestMessage(HttpMethod.Get, "chunked") + { + Version = new Version(1, 1) + }; + + var response = await client.SendAsync(requestMessage); var responseText = await response.Content.ReadAsStringAsync(); try { @@ -285,7 +295,12 @@ namespace ServerComparison.FunctionalTests private static async Task CheckManuallyChunkedAsync(HttpClient client, ILogger logger) { logger.LogInformation("Testing ManuallyChunked"); - var response = await client.GetAsync("manuallychunked"); + var requestMessage = new HttpRequestMessage(HttpMethod.Get, "manuallychunked") + { + Version = new Version(1, 1) + }; + + var response = await client.SendAsync(requestMessage); var responseText = await response.Content.ReadAsStringAsync(); try { From b19bf88af760ba04b3f2e05344e22979858dbe06 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 16 Mar 2018 11:17:03 -0700 Subject: [PATCH 264/291] Branching for 2.1.0-preview2 --- build/dependencies.props | 30 +++++++++++++++--------------- build/repo.props | 4 ++-- build/sources.props | 2 +- korebuild-lock.txt | 4 ++-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index ce0b3c16d3..af11fafaa2 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15728 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 0.5.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 + 2.1.0-preview2-15742 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 0.5.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 + 2.1.0-preview2-30355 2.0.0 - 2.1.0-preview2-26308-01 - 2.1.0-preview2-30285 + 2.1.0-preview2-26314-02 + 2.1.0-preview2-30355 15.6.0 1.4.0 3.2.0 diff --git a/build/repo.props b/build/repo.props index 84d4aa4851..b398b64bcb 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,4 +1,4 @@ - + @@ -7,7 +7,7 @@ Internal.AspNetCore.Universe.Lineup - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json + https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json diff --git a/build/sources.props b/build/sources.props index 9215df9751..36045f12b5 100644 --- a/build/sources.props +++ b/build/sources.props @@ -6,7 +6,7 @@ $(RestoreSources); https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 138d848db1..e40ef6651b 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15728 -commithash:393377068ddcf51dfee0536536d455f57a828b06 +version:2.1.0-preview2-15742 +commithash:21fbb0f2c3fe4a9216e2d59632b98cfd7d685962 From 210c01314f82fe1bad770c2e5d8a9ca653a52667 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 16 Mar 2018 11:28:18 -0700 Subject: [PATCH 265/291] Update version prefix to preview3 --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index a11ea1ed52..24f2b00a0a 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.1.0 - preview2 + preview3 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From 0eead166d5979bb57a1f73da1f7d9986735b5ebd Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 16 Mar 2018 12:33:57 -0700 Subject: [PATCH 266/291] Update KoreBuild channel --- korebuild.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/korebuild.json b/korebuild.json index bd5d51a51b..678d8bb948 100644 --- a/korebuild.json +++ b/korebuild.json @@ -1,4 +1,4 @@ { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev" + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.1/tools/korebuild.schema.json", + "channel": "release/2.1" } From 09cac73131d38872c1af04928ef8713639652b0a Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 21 Mar 2018 10:41:06 -0700 Subject: [PATCH 267/291] Add NuGetPackageVerifier.json --- NuGetPackageVerifier.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 NuGetPackageVerifier.json diff --git a/NuGetPackageVerifier.json b/NuGetPackageVerifier.json new file mode 100644 index 0000000000..22ef3c09c0 --- /dev/null +++ b/NuGetPackageVerifier.json @@ -0,0 +1,7 @@ +{ + "Default": { + "rules": [ + "DefaultCompositeRule" + ] + } +} From 042b0ff46a758941766c011cf210e27164d3e2fb Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 25 Mar 2018 15:55:05 -0700 Subject: [PATCH 268/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 32 ++++++++++++++++---------------- korebuild-lock.txt | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index ce0b3c16d3..9c92819964 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,23 +3,23 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15728 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 0.5.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 - 2.1.0-preview2-30285 + 2.1.0-preview3-17001 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 0.5.0-preview2-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 + 2.1.0-preview3-32037 2.0.0 - 2.1.0-preview2-26308-01 - 2.1.0-preview2-30285 - 15.6.0 + 2.1.0-preview2-26314-02 + 2.1.0-preview3-32037 + 15.6.1 1.4.0 3.2.0 2.3.1 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 138d848db1..3a326c7d58 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15728 -commithash:393377068ddcf51dfee0536536d455f57a828b06 +version:2.1.0-preview3-17001 +commithash:dda68c56abf0d3b911fe6a2315872c446b314585 From 02ebb4fc6429eb6b55571e297061902d20a85bae Mon Sep 17 00:00:00 2001 From: "Nate McMaster (automated)" Date: Wed, 28 Mar 2018 11:03:46 -0700 Subject: [PATCH 269/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 32 ++++++++++++++++---------------- korebuild-lock.txt | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index af11fafaa2..d677fa2f04 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,23 +3,23 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15742 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 0.5.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 + 2.1.0-preview2-15749 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 0.5.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 + 2.1.0-preview2-30478 2.0.0 - 2.1.0-preview2-26314-02 - 2.1.0-preview2-30355 - 15.6.0 + 2.1.0-preview2-26326-03 + 2.1.0-preview2-30478 + 15.6.1 1.4.0 3.2.0 2.3.1 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index e40ef6651b..b8e036fe2c 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15742 -commithash:21fbb0f2c3fe4a9216e2d59632b98cfd7d685962 +version:2.1.0-preview2-15749 +commithash:5544c9ab20fa5e24b9e155d8958a3c3b6f5f9df9 From 0446e3869e16a9c1d6a745a3da626f00ee178380 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 3 Apr 2018 22:42:23 +0000 Subject: [PATCH 270/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 30 +++++++++++++++--------------- korebuild-lock.txt | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 9c92819964..1f20905d84 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,22 +3,22 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview3-17001 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 0.5.0-preview2-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 - 2.1.0-preview3-32037 + 2.1.0-preview3-17002 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 0.5.0-preview2-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 + 2.1.0-preview3-32110 2.0.0 - 2.1.0-preview2-26314-02 - 2.1.0-preview3-32037 + 2.1.0-preview3-26331-01 + 2.1.0-preview3-32110 15.6.1 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 3a326c7d58..b3af0b8bce 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview3-17001 -commithash:dda68c56abf0d3b911fe6a2315872c446b314585 +version:2.1.0-preview3-17002 +commithash:b8e4e6ab104adc94c0719bb74229870e9b584a7f From f44af6b812bc62a89d8f09af9a9ae6a2172d7064 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Wed, 4 Apr 2018 12:35:23 -0700 Subject: [PATCH 271/291] Reenable IISExpress out of process tests; add ANCM in process tests. (#106) --- ServerTests.sln | 2 +- build/dependencies.props | 1 + .../HelloWorldTest.cs | 29 +++++++++++++++---- .../NtlmAuthenticationTest.cs | 18 ++++++++++-- .../ResponseCompressionTests.cs | 27 ++++++++++++----- .../ResponseTests.cs | 6 ++-- test/ServerComparison.TestSites/Program.cs | 7 +++-- .../ServerComparison.TestSites.csproj | 6 ++-- 8 files changed, 71 insertions(+), 25 deletions(-) diff --git a/ServerTests.sln b/ServerTests.sln index 9434226d0a..bd58846053 100644 --- a/ServerTests.sln +++ b/ServerTests.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.10 +VisualStudioVersion = 15.0.27130.2036 MinimumVisualStudioVersion = 15.0.26730.03 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49AB8AAA-8160-48DF-A18B-78F51E54E02A}" ProjectSection(SolutionItems) = preProject diff --git a/build/dependencies.props b/build/dependencies.props index 1f20905d84..231cd929cf 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,6 +16,7 @@ 2.1.0-preview3-32110 2.1.0-preview3-32110 2.1.0-preview3-32110 + 2.1.0-preview3-32110 2.0.0 2.1.0-preview3-26331-01 2.1.0-preview3-32110 diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 2febca4269..74ddfddcc8 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -21,7 +21,6 @@ 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) @@ -32,14 +31,27 @@ namespace ServerComparison.FunctionalTests [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.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Windows(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + public Task HelloWorld_HttpSys(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } + [ConditionalTheory] + [FrameworkSkipCondition(RuntimeFrameworks.CLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.InProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + public Task HelloWorld_IISExpress(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, HostingModel hostingModel) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType, hostingModel: hostingModel); + } + [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -58,7 +70,13 @@ namespace ServerComparison.FunctionalTests return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); } - private async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null) + + private async Task HelloWorld(ServerType serverType, + RuntimeFlavor runtimeFlavor, + RuntimeArchitecture architecture, + ApplicationType applicationType, + [CallerMemberName] string testName = null, + HostingModel hostingModel = HostingModel.OutOfProcess) { testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) @@ -71,7 +89,8 @@ namespace ServerComparison.FunctionalTests ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), - ApplicationType = applicationType + ApplicationType = applicationType, + HostingModel = hostingModel }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index 685c6d0a06..ad906668fe 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -27,12 +27,23 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.MacOSX)] [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")] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.InProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess)] [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) + public async Task NtlmAuthentication(ServerType serverType, + RuntimeFlavor runtimeFlavor, + string targetFramework, + RuntimeArchitecture architecture, + ApplicationType applicationType, + HostingModel hostingModel = HostingModel.OutOfProcess) { var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) @@ -45,7 +56,8 @@ namespace ServerComparison.FunctionalTests ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "NtlmAuthentication.config", nginxConfig: null), SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config TargetFramework = targetFramework, - ApplicationType = applicationType + ApplicationType = applicationType, + HostingModel = hostingModel }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index f397739a85..9553d49db1 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -32,7 +32,16 @@ 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.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_IISExpress_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + } + + [ConditionalTheory] + [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -56,19 +65,19 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_Windows_HostCompression() + public Task ResponseCompression_IISExpress_HostCompression() { return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact(Skip ="Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_Windows_HostCompression_CLR() + public Task ResponseCompression_IISExpress_HostCompression_CLR() { return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true); } @@ -89,7 +98,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: false); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact(Skip ="Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppCompression() @@ -114,7 +123,7 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppAndHostCompression() @@ -122,8 +131,10 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Standalone, hostCompression: true); } - [ConditionalFact(Skip = "https://github.com/aspnet/ServerTests/issues/96")] + [ConditionalFact(Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppAndHostCompression_CLR() { return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: true); diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index aad5295388..70e3305c9f 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -26,7 +26,7 @@ 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.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -87,7 +87,7 @@ 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.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -113,7 +113,7 @@ 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.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index 25a79e0c3b..44c89e792a 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -27,8 +27,8 @@ namespace ServerComparison.TestSites .UseIISIntegration() .UseStartup("ServerComparison.TestSites"); - // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. - if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.HttpSys", System.StringComparison.Ordinal)) + // Switch between Kestrel, IIS, and HttpSys for different tests. Default to Kestrel for normal app execution. + if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.HttpSys", StringComparison.Ordinal)) { if (string.Equals(builder.GetSetting("environment") ?? Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), @@ -49,8 +49,9 @@ namespace ServerComparison.TestSites builder.UseHttpSys(); } } - else + else if (!string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.IIS", StringComparison.Ordinal)) { + // Check that we are not using IIS inproc before we add Kestrel. builder.UseKestrel(); } diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 48cbaaf1c4..b4b8d55048 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -1,14 +1,16 @@  - $(StandardTestTfms) + $(StandardTestTfms) win7-x86;win7-x64;linux-x64;osx-x64 - + + + From 53564567662a09adb3c8d4c5ecbd5b4cfada1351 Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Thu, 5 Apr 2018 10:13:48 -0700 Subject: [PATCH 272/291] Simplify test TFMs #82 --- .../HelloWorldTest.cs | 20 +++++++++---------- .../Helpers.cs | 7 +------ .../NtlmAuthenticationTest.cs | 8 +------- .../ResponseCompressionTests.cs | 11 +++++----- .../ResponseTests.cs | 18 +++++++++++------ .../ServerComparison.FunctionalTests.csproj | 3 ++- 6 files changed, 32 insertions(+), 35 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 74ddfddcc8..1e146b4997 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -19,18 +19,10 @@ namespace ServerComparison.FunctionalTests { } - [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] - [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.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)] public Task HelloWorld_HttpSys(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) @@ -39,7 +31,6 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CLR)] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess)] @@ -52,6 +43,15 @@ namespace ServerComparison.FunctionalTests return HelloWorld(serverType, runtimeFlavor, architecture, applicationType, hostingModel: hostingModel); } + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + public Task HelloWorld_Kestrel_Clr(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + { + return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + } + [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/test/ServerComparison.FunctionalTests/Helpers.cs index 4086cb8232..0c4c4ab89d 100644 --- a/test/ServerComparison.FunctionalTests/Helpers.cs +++ b/test/ServerComparison.FunctionalTests/Helpers.cs @@ -50,12 +50,7 @@ namespace ServerComparison.FunctionalTests { 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) { @@ -68,7 +63,7 @@ namespace ServerComparison.FunctionalTests #endif } - throw new ArgumentException($"Unknown RuntimeFlavor '{runtimeFlavor}"); + throw new ArgumentException($"Unknown RuntimeFlavor '{runtimeFlavor}'"); } } } \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index ad906668fe..e1c4a6c96b 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -1,6 +1,5 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NET461 // https://github.com/aspnet/ServerTests/issues/82 using System.Net; using System.Net.Http; @@ -22,7 +21,6 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [Trait("ServerComparison.FunctionalTests", "ServerComparison.FunctionalTests")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [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")] @@ -117,8 +115,4 @@ namespace ServerComparison.FunctionalTests } } } -} -#elif NETCOREAPP2_0 || NETCOREAPP2_1 -#else -#error target frameworks need to be updated -#endif +} \ No newline at end of file diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 9553d49db1..4c4c755191 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -31,7 +31,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] @@ -41,7 +42,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) { @@ -74,7 +76,6 @@ namespace ServerComparison.FunctionalTests } [ConditionalFact(Skip ="Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_IISExpress_HostCompression_CLR() @@ -92,7 +93,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalFact] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppCompression_CLR() { return ResponseCompression(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: false); @@ -132,7 +134,6 @@ namespace ServerComparison.FunctionalTests } [ConditionalFact(Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] public Task ResponseCompression_Windows_AppAndHostCompression_CLR() diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 70e3305c9f..18282592e5 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -25,7 +25,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) @@ -51,7 +52,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [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,7 +63,8 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [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) @@ -86,7 +89,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) @@ -112,7 +116,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] public Task ResponseFormats_Windows_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) @@ -138,7 +143,8 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [FrameworkSkipCondition(RuntimeFrameworks.CoreCLR)] + [OSSkipCondition(OperatingSystems.Linux)] + [OSSkipCondition(OperatingSystems.MacOSX)] // [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) diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj index fb1f789be3..ba0fea38e1 100644 --- a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,7 +1,8 @@  - $(StandardTestTfms) + + netcoreapp2.1 From f4493b99bd79a00815a8aa6e114e2605f0906846 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Fri, 13 Apr 2018 17:04:56 -0700 Subject: [PATCH 273/291] React to ANCM current addition and organize tests (#109) --- build/dependencies.props | 33 +-- korebuild-lock.txt | 4 +- .../HelloWorldTest.cs | 63 +++-- .../NtlmAuthenticationTest.cs | 29 +- .../ResponseCompressionTests.cs | 208 +++++++++----- .../ResponseTests.cs | 253 +++++++++++------- test/ServerComparison.TestSites/Program.cs | 5 +- .../ServerComparison.TestSites.csproj | 7 +- 8 files changed, 369 insertions(+), 233 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 231cd929cf..155e30ad67 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,23 +3,24 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview3-17002 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 0.5.0-preview2-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 - 2.1.0-preview3-32110 + 2.1.0-preview3-17031 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 0.5.0-preview2-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 + 2.1.0-preview3-32196 2.0.0 - 2.1.0-preview3-26331-01 - 2.1.0-preview3-32110 + 2.1.0-preview2-26406-04 + 2.1.0-preview3-32196 15.6.1 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index b3af0b8bce..c7f432f4cd 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview3-17002 -commithash:b8e4e6ab104adc94c0719bb74229870e9b584a7f +version:2.1.0-preview3-17031 +commithash:a23c49d1f00788a7fbf71d04a59b68f936114d4e diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 1e146b4997..986654ee77 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -20,54 +20,51 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [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)] - public Task HelloWorld_HttpSys(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task HelloWorld_WebListener(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + return HelloWorld(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, applicationType); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.InProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - public Task HelloWorld_IISExpress(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, HostingModel hostingModel) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + public Task HelloWorld_IISExpress(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType, hostingModel: hostingModel); + return HelloWorld(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task HelloWorld_Kestrel_Clr(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + public Task HelloWorld_Kestrel_Clr(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + return HelloWorld(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Kestrel(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task HelloWorld_Kestrel(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + return HelloWorld(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task HelloWorld_Nginx(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task HelloWorld_Nginx(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return HelloWorld(serverType, runtimeFlavor, architecture, applicationType); + return HelloWorld(ServerType.Nginx, runtimeFlavor, RuntimeArchitecture.x64, applicationType); } @@ -76,7 +73,8 @@ namespace ServerComparison.FunctionalTests RuntimeArchitecture architecture, ApplicationType applicationType, [CallerMemberName] string testName = null, - HostingModel hostingModel = HostingModel.OutOfProcess) + HostingModel hostingModel = HostingModel.OutOfProcess, + string additionalPublishParameters = "") { testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) @@ -90,7 +88,8 @@ namespace ServerComparison.FunctionalTests SiteName = "HttpTestSite", // This is configured in the Http.config TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), ApplicationType = applicationType, - HostingModel = hostingModel + HostingModel = hostingModel, + AdditionalPublishParameters = additionalPublishParameters }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index e1c4a6c96b..c703157f28 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -21,17 +21,18 @@ namespace ServerComparison.FunctionalTests } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [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")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x86, ApplicationType.Portable, Skip = "Tests disabled on x86 because of https://github.com/aspnet/Hosting/issues/601")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.InProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess)] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, "V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.0", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [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)] @@ -41,7 +42,8 @@ namespace ServerComparison.FunctionalTests string targetFramework, RuntimeArchitecture architecture, ApplicationType applicationType, - HostingModel hostingModel = HostingModel.OutOfProcess) + HostingModel hostingModel = HostingModel.OutOfProcess, + string additionalPublishParameters = "") { var testName = $"NtlmAuthentication_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) @@ -55,7 +57,8 @@ namespace ServerComparison.FunctionalTests SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config TargetFramework = targetFramework, ApplicationType = applicationType, - HostingModel = hostingModel + HostingModel = hostingModel, + AdditionalPublishParameters = additionalPublishParameters }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 4c4c755191..dbf9f4fbdd 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -30,26 +30,131 @@ namespace ServerComparison.FunctionalTests { } + // IIS Express [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_IISExpress_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + public Task ResponseCompression_IISExpress_NoCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(ServerType.IISExpress, + runtimeFlavor, + RuntimeArchitecture.x64, + CheckNoCompressionAsync, + applicationType, + hostCompression: false, + hostingModel: hostingModel, + additionalPublishParameters: additionalPublishParameters); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseCompression_Windows_NoCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + public Task ResponseCompression_IISExpress_HostCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); + return ResponseCompression(ServerType.IISExpress, + runtimeFlavor, + RuntimeArchitecture.x64, + CheckHostCompressionAsync, + applicationType, + hostCompression: true, + hostingModel: hostingModel, + additionalPublishParameters: additionalPublishParameters); } + [ConditionalTheory(Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + public Task ResponseCompression_IISExpress_AppCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) + { + return ResponseCompression(ServerType.IISExpress, + runtimeFlavor, + RuntimeArchitecture.x64, + CheckAppCompressionAsync, + applicationType, + hostCompression: true, + hostingModel: hostingModel, + additionalPublishParameters: additionalPublishParameters); + } + + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + public Task ResponseCompression_IISExpress_AppAndHostCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) + { + return ResponseCompression(ServerType.IISExpress, + runtimeFlavor, + RuntimeArchitecture.x64, + CheckAppCompressionAsync, + applicationType, + hostCompression: true, + hostingModel: hostingModel, + additionalPublishParameters: additionalPublishParameters); + } + + // WebListener + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseCompression_WebListener_NoCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseCompression(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckNoCompressionAsync, applicationType, hostCompression: false); + } + + // WebListener doesn't support HostCompression + // "The archive entry was compressed using an unsupported compression method." + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseCompression_WebListener_AppCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseCompression(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckAppCompressionAsync, applicationType, hostCompression: false); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseCompression_WebListener_AppAndHostCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseCompression(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckAppCompressionAsync, applicationType, hostCompression: true); + } + + // Kestrel [Theory] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] @@ -58,6 +163,15 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } + [Theory] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] + public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + { + return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); + } + + // Nginx [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -67,22 +181,6 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckNoCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_IISExpress_HostCompression() - { - return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true); - } - - [ConditionalFact(Skip ="Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_IISExpress_HostCompression_CLR() - { - return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckHostCompressionAsync, ApplicationType.Portable, hostCompression: true); - } - [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -92,30 +190,6 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: true); } - [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_Windows_AppCompression_CLR() - { - return ResponseCompression(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: false); - } - - [ConditionalFact(Skip ="Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_Windows_AppCompression() - { - return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Standalone, hostCompression: false); - } - - [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseCompression_Kestrel_AppCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) - { - return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: false); - } - [ConditionalTheory(Skip = "No pass-through compression https://github.com/aspnet/BasicMiddleware/issues/123")] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -125,22 +199,6 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckHostCompressionAsync, applicationType, hostCompression: false); } - [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_Windows_AppAndHostCompression() - { - return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Standalone, hostCompression: true); - } - - [ConditionalFact(Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public Task ResponseCompression_Windows_AppAndHostCompression_CLR() - { - return ResponseCompression(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, CheckAppCompressionAsync, ApplicationType.Portable, hostCompression: true); - } - [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] @@ -150,7 +208,15 @@ namespace ServerComparison.FunctionalTests return ResponseCompression(serverType, runtimeFlavor, architecture, CheckAppCompressionAsync, applicationType, hostCompression: true); } - private async Task ResponseCompression(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, bool hostCompression, [CallerMemberName] string testName = null) + private async Task ResponseCompression(ServerType serverType, + RuntimeFlavor runtimeFlavor, + RuntimeArchitecture architecture, + Func scenario, + ApplicationType applicationType, + bool hostCompression, + [CallerMemberName] string testName = null, + HostingModel hostingModel = HostingModel.OutOfProcess, + string additionalPublishParameters = "") { testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) @@ -165,7 +231,9 @@ namespace ServerComparison.FunctionalTests hostCompression ? "nginx.conf" : "NoCompression.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), - ApplicationType = applicationType + ApplicationType = applicationType, + HostingModel = hostingModel, + AdditionalPublishParameters = additionalPublishParameters }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 18282592e5..44f97c7825 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -24,143 +24,200 @@ namespace ServerComparison.FunctionalTests { } + // IIS Express [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable, HostingModel.OutOfProcess, "", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2")] + public Task ResponseFormats_IISExpress_ContentLength(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); - } - - [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) - { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, CheckContentLengthAsync, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ContentLength(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable, HostingModel.OutOfProcess, "", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2")] + public Task ResponseFormats_IISExpress_Chunked(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckContentLengthAsync, applicationType); + return ResponseFormats(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, CheckChunkedAsync, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable, HostingModel.OutOfProcess, "", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2")] + public Task ResponseFormats_IIS_ManuallyChunk(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) + { + return ResponseFormats(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, CheckManuallyChunkedAsync, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); + } + + // Weblistener + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_WebListener_ContentLength(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckContentLengthAsync, applicationType); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_WebListener_Chunked(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckChunkedAsync, applicationType); + } + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] // 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) + public Task ResponseFormats_WebListener_Http10ConnectionClose(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); + return ResponseFormats(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckHttp10ConnectionCloseAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] // https://github.com/aspnet/WebListener/issues/259 + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] // 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) + public Task ResponseFormats_WebListener_Http11ConnectionClose(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckHttp11ConnectionCloseAsync, applicationType); } - [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http10ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_WebListener_ManuallyChunk(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp10ConnectionCloseAsync, applicationType); - } - - [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Http11ConnectionClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) - { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckHttp11ConnectionCloseAsync, applicationType); + return ResponseFormats(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckManuallyChunkedAsync, applicationType); } [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable)] - public Task ResponseFormats_Windows_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_WebListener_ManuallyChunkAndClose(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(ServerType.WebListener, runtimeFlavor, RuntimeArchitecture.x64, CheckManuallyChunkedAndCloseAsync, applicationType); + } + + // Kestrel + [Theory] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ContentLength(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, CheckContentLengthAsync, applicationType); } [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http10ConnectionClose(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, CheckHttp10ConnectionCloseAsync, applicationType); + } + + [Theory] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Http11ConnectionClose(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, CheckHttp11ConnectionCloseAsync, applicationType); + } + + [Theory] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_Chunked(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, CheckChunkedAsync, applicationType); + } + + [Theory] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunk(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, CheckManuallyChunkedAsync, applicationType); + } + + [Theory] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.Kestrel, runtimeFlavor, RuntimeArchitecture.x64, CheckManuallyChunkedAndCloseAsync, applicationType); + } + + // Nginx + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Windows)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ContentLength( RuntimeFlavor runtimeFlavor, ApplicationType applicationType) + { + return ResponseFormats(ServerType.Nginx, runtimeFlavor, RuntimeArchitecture.x64, CheckContentLengthAsync, applicationType); } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_Chunked(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_Chunked(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckChunkedAsync, applicationType); + return ResponseFormats(ServerType.Nginx, runtimeFlavor, RuntimeArchitecture.x64, CheckChunkedAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, ApplicationType.Portable, Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [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); - } - [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) - { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); - } [ConditionalTheory] [OSSkipCondition(OperatingSystems.Windows)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Nginx, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Nginx_ManuallyChunk(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable)] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone)] + public Task ResponseFormats_Nginx_ManuallyChunk(RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAsync, applicationType); + return ResponseFormats(ServerType.Nginx, runtimeFlavor, RuntimeArchitecture.x64, CheckManuallyChunkedAsync, applicationType); } - [ConditionalTheory] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - // [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); - } - - [Theory] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Portable)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, ApplicationType.Standalone)] - public Task ResponseFormats_Kestrel_ManuallyChunkAndClose(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType) - { - return ResponseFormats(serverType, runtimeFlavor, architecture, CheckManuallyChunkedAndCloseAsync, applicationType); - } - - private async Task ResponseFormats(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, Func scenario, ApplicationType applicationType, [CallerMemberName] string testName = null) + private async Task ResponseFormats(ServerType serverType, + RuntimeFlavor runtimeFlavor, + RuntimeArchitecture architecture, + Func scenario, + ApplicationType applicationType, + [CallerMemberName] string testName = null, + HostingModel hostingModel = HostingModel.OutOfProcess, + string additionalPublishParameters = "") { testName = $"{testName}_{serverType}_{runtimeFlavor}_{architecture}_{applicationType}"; using (StartLog(out var loggerFactory, testName)) @@ -173,7 +230,9 @@ namespace ServerComparison.FunctionalTests ServerConfigTemplateContent = Helpers.GetConfigContent(serverType, "Http.config", "nginx.conf"), SiteName = "HttpTestSite", // This is configured in the Http.config TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), - ApplicationType = applicationType + ApplicationType = applicationType, + HostingModel = hostingModel, + AdditionalPublishParameters = additionalPublishParameters }; using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory)) diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index 44c89e792a..f6ae1163c1 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -24,7 +24,6 @@ namespace ServerComparison.TestSites factory.AddConsole(); factory.AddFilter("Console", level => level >= LogLevel.Warning); }) - .UseIISIntegration() .UseStartup("ServerComparison.TestSites"); // Switch between Kestrel, IIS, and HttpSys for different tests. Default to Kestrel for normal app execution. @@ -49,11 +48,13 @@ namespace ServerComparison.TestSites builder.UseHttpSys(); } } - else if (!string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.IIS", StringComparison.Ordinal)) + else { // Check that we are not using IIS inproc before we add Kestrel. builder.UseKestrel(); } + + builder.UseIISIntegration(); var host = builder.Build(); diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index b4b8d55048..ea1974de41 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -5,9 +5,14 @@ win7-x86;win7-x64;linux-x64;osx-x64 - + + + + + + From 46e3c69458216547446347bd6f3371a26fe779e2 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 15 Apr 2018 14:26:21 -0700 Subject: [PATCH 274/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 34 +++++++++++++++++----------------- korebuild-lock.txt | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 155e30ad67..f790c15193 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,24 +3,24 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview3-17031 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 0.5.0-preview2-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 - 2.1.0-preview3-32196 + 2.1.0-preview3-17018 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 0.5.0-preview2-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 + 2.1.0-preview3-32233 2.0.0 - 2.1.0-preview2-26406-04 - 2.1.0-preview3-32196 + 2.1.0-preview3-26413-05 + 2.1.0-preview3-32233 15.6.1 1.4.0 3.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index c7f432f4cd..b419d767b9 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview3-17031 -commithash:a23c49d1f00788a7fbf71d04a59b68f936114d4e +version:2.1.0-preview3-17018 +commithash:af264ca131f212b5ba8aafbc5110fc0fc510a2be From da33bd257a7fd9737331fed33919e146d8b02061 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Mon, 16 Apr 2018 17:02:25 -0700 Subject: [PATCH 275/291] Branching for 2.1.0-rc1 --- build/repo.props | 3 ++- korebuild.json | 4 ++-- version.props | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/repo.props b/build/repo.props index 84d4aa4851..c8bd413e1e 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,4 +1,4 @@ - + @@ -7,6 +7,7 @@ Internal.AspNetCore.Universe.Lineup + 2.1.0-rc1-* https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json diff --git a/korebuild.json b/korebuild.json index bd5d51a51b..678d8bb948 100644 --- a/korebuild.json +++ b/korebuild.json @@ -1,4 +1,4 @@ { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev" + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.1/tools/korebuild.schema.json", + "channel": "release/2.1" } diff --git a/version.props b/version.props index 24f2b00a0a..e27532787e 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.1.0 - preview3 + rc1 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From 0bf79e8d597f4e24e1f28768cba0858ac523fe24 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 19 Apr 2018 16:44:43 -0700 Subject: [PATCH 276/291] Set NETStandardImplicitPackageVersion via dependencies.props --- Directory.Build.targets | 1 + build/dependencies.props | 1 + 2 files changed, 2 insertions(+) diff --git a/Directory.Build.targets b/Directory.Build.targets index 894b1d0cf8..53b3f6e1da 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -2,5 +2,6 @@ $(MicrosoftNETCoreApp20PackageVersion) $(MicrosoftNETCoreApp21PackageVersion) + $(NETStandardLibrary20PackageVersion) diff --git a/build/dependencies.props b/build/dependencies.props index f790c15193..1ece8c067a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -22,6 +22,7 @@ 2.1.0-preview3-26413-05 2.1.0-preview3-32233 15.6.1 + 2.0.1 1.4.0 3.2.0 2.3.1 From 592e5ea45aa216c52dfc0db55fecca41c27bcb84 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 19 Apr 2018 22:36:06 -0700 Subject: [PATCH 277/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 34 +++++++++++++++++----------------- korebuild-lock.txt | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 1ece8c067a..ae81767de2 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,24 +3,24 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview3-17018 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 0.5.0-preview2-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 + 2.1.0-rc1-15774 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 0.5.0-preview2-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 2.0.0 - 2.1.0-preview3-26413-05 - 2.1.0-preview3-32233 + 2.1.0-rc1-26419-02 + 2.1.0-rc1-30613 15.6.1 2.0.1 1.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index b419d767b9..9d4ef8c888 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview3-17018 -commithash:af264ca131f212b5ba8aafbc5110fc0fc510a2be +version:2.1.0-rc1-15774 +commithash:ed5ca9de3c652347dbb0158a9a65eff3471d2114 From 60b448449db6d5b37d46240f8e3cdebe5871983c Mon Sep 17 00:00:00 2001 From: "Nate McMaster (automated)" Date: Mon, 30 Apr 2018 14:51:45 -0700 Subject: [PATCH 278/291] Bump version to 2.1.0-rtm --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index e27532787e..b9552451d8 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.1.0 - rc1 + rtm $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From 708b2ded7640d4b2f54f306d5045299e1bb036f8 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Mon, 16 Apr 2018 20:57:08 -0700 Subject: [PATCH 279/291] Skip ANCM v2 in-proc chunked tests (#111) - Started failing after dependencies.props update: https://github.com/aspnet/ServerTests/commit/46e3c69458216547446347bd6f3371a26fe779e2 - Issue to un-skip: https://github.com/aspnet/ServerTests/issues/110 --- test/ServerComparison.FunctionalTests/ResponseTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 44f97c7825..13f5f5b945 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -46,8 +46,8 @@ namespace ServerComparison.FunctionalTests [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2", Skip = "Failing after dependencies.props update. Issue to un-skip: https://github.com/aspnet/ServerTests/issues/110")] + [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2", Skip = "Failing after dependencies.props update. Issue to un-skip: https://github.com/aspnet/ServerTests/issues/110")] public Task ResponseFormats_IISExpress_Chunked(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { return ResponseFormats(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, CheckChunkedAsync, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); From 910ed9b684ee4060e13754a3698c5e60f64cee89 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Fri, 4 May 2018 07:50:40 -0700 Subject: [PATCH 280/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 36 ++++++++++++++++++------------------ korebuild-lock.txt | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index ae81767de2..bbae932bf9 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,26 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-rc1-15774 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 0.5.0-preview2-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 + 2.1.0-rtm-15783 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 0.5.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 + 2.1.0-rtm-30721 2.0.0 - 2.1.0-rc1-26419-02 - 2.1.0-rc1-30613 + 2.1.0-rtm-26502-02 + 2.1.0-rtm-30721 15.6.1 - 2.0.1 + 2.0.3 1.4.0 3.2.0 2.3.1 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 9d4ef8c888..3673744db9 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-rc1-15774 -commithash:ed5ca9de3c652347dbb0158a9a65eff3471d2114 +version:2.1.0-rtm-15783 +commithash:5fc2b2f607f542a2ffde11c19825e786fc1a3774 From db02f23914fba797ab2b10adb1e2e6f5c20a3cdb Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Fri, 4 May 2018 10:44:57 -0700 Subject: [PATCH 281/291] React to inprocess mode remval (#118) --- test/ServerComparison.FunctionalTests/HelloWorldTest.cs | 2 -- .../ResponseCompressionTests.cs | 6 ------ test/ServerComparison.FunctionalTests/ResponseTests.cs | 6 ------ 3 files changed, 14 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs index 986654ee77..62e1fcfbd8 100644 --- a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs +++ b/test/ServerComparison.FunctionalTests/HelloWorldTest.cs @@ -32,8 +32,6 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index dbf9f4fbdd..80fdfc5d9c 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -57,10 +57,8 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] public Task ResponseCompression_IISExpress_HostCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) @@ -79,10 +77,8 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] public Task ResponseCompression_IISExpress_AppCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) @@ -102,10 +98,8 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] public Task ResponseCompression_IISExpress_AppAndHostCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/test/ServerComparison.FunctionalTests/ResponseTests.cs index 13f5f5b945..62d7fec6e3 100644 --- a/test/ServerComparison.FunctionalTests/ResponseTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseTests.cs @@ -32,8 +32,6 @@ namespace ServerComparison.FunctionalTests [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2")] public Task ResponseFormats_IISExpress_ContentLength(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { return ResponseFormats(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, CheckContentLengthAsync, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); @@ -46,8 +44,6 @@ namespace ServerComparison.FunctionalTests [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2", Skip = "Failing after dependencies.props update. Issue to un-skip: https://github.com/aspnet/ServerTests/issues/110")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2", Skip = "Failing after dependencies.props update. Issue to un-skip: https://github.com/aspnet/ServerTests/issues/110")] public Task ResponseFormats_IISExpress_Chunked(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { return ResponseFormats(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, CheckChunkedAsync, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); @@ -60,8 +56,6 @@ namespace ServerComparison.FunctionalTests [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, " /p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, " /p:ANCMVersion=V2")] public Task ResponseFormats_IIS_ManuallyChunk(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) { return ResponseFormats(ServerType.IISExpress, runtimeFlavor, RuntimeArchitecture.x64, CheckManuallyChunkedAsync, applicationType, hostingModel: hostingModel, additionalPublishParameters: additionalPublishParameters); From 232c2b2e0629b51032b745a68355edb651cd4573 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Mon, 7 May 2018 09:15:37 -0700 Subject: [PATCH 282/291] React to inprocess mode removal (#119) --- test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs | 2 -- .../ResponseCompressionTests.cs | 2 -- 2 files changed, 4 deletions(-) diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs index c703157f28..0aff3407db 100644 --- a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs +++ b/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs @@ -23,8 +23,6 @@ namespace ServerComparison.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, "net461", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, "V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, "netcoreapp2.1", RuntimeArchitecture.x64, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs index 80fdfc5d9c..301a0b74e6 100644 --- a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs +++ b/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs @@ -35,10 +35,8 @@ namespace ServerComparison.FunctionalTests [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Portable, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1")] [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2")] - [InlineData(RuntimeFlavor.CoreClr, ApplicationType.Standalone, HostingModel.InProcess, "/p:ANCMVersion=V2")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V1", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] [InlineData(RuntimeFlavor.Clr, ApplicationType.Standalone, HostingModel.OutOfProcess, "/p:ANCMVersion=V2", Skip = "Websdk issue with full framework publish. See https://github.com/aspnet/websdk/pull/322")] public Task ResponseCompression_IISExpress_NoCompression(RuntimeFlavor runtimeFlavor, ApplicationType applicationType, HostingModel hostingModel, string additionalPublishParameters) From 9db1fc8e556b7ea4d659ca8aafb627a7ebb3f93c Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 29 May 2018 09:52:54 -0700 Subject: [PATCH 283/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 34 +++++++++++++++++----------------- korebuild-lock.txt | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index bbae932bf9..9b09cef891 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,24 +3,24 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-rtm-15783 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 0.5.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 - 2.1.0-rtm-30721 + 2.1.1-rtm-15790 + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 + 0.5.0 + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 + 2.1.0 2.0.0 - 2.1.0-rtm-26502-02 - 2.1.0-rtm-30721 + 2.1.0 + 2.1.0 15.6.1 2.0.3 1.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 3673744db9..cd5b409a1e 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-rtm-15783 -commithash:5fc2b2f607f542a2ffde11c19825e786fc1a3774 +version:2.1.1-rtm-15790 +commithash:274c65868e735f29f4078c1884c61c4371ee1fc0 From ad246441c5209274f675df0c1befb3274b8c0b92 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 5 Jun 2018 09:11:44 -0700 Subject: [PATCH 284/291] Bumping version from 2.1.0 to 2.1.1 --- version.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.props b/version.props index b9552451d8..669c874829 100644 --- a/version.props +++ b/version.props @@ -1,6 +1,6 @@ - + - 2.1.0 + 2.1.1 rtm $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final From e4da0155910aad63360d47822d6b8affd4a2f61b Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 12 Jun 2018 19:34:17 +0000 Subject: [PATCH 285/291] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 34 +++++++++++++++++----------------- korebuild-lock.txt | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 9b09cef891..0742b4f74c 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,24 +3,24 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.1-rtm-15790 - 2.1.0 - 2.1.0 - 2.1.0 - 2.1.0 - 2.1.0 - 2.1.0 - 0.5.0 - 2.1.0 - 2.1.0 - 2.1.0 - 2.1.0 - 2.1.0 - 2.1.0 - 2.1.0 + 2.1.1-rtm-15793 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 0.5.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 2.0.0 - 2.1.0 - 2.1.0 + 2.1.1 + 2.1.1 15.6.1 2.0.3 1.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index cd5b409a1e..bc84e0cd53 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.1-rtm-15790 -commithash:274c65868e735f29f4078c1884c61c4371ee1fc0 +version:2.1.1-rtm-15793 +commithash:988313f4b064d6c69fc6f7b845b6384a6af3447a From 60564e7d5bb63ae2d6cc0137c5fbd508eddd2e17 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 27 Jun 2018 13:39:51 -0700 Subject: [PATCH 286/291] Bumping version from 2.1.1 to 2.1.2 --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 669c874829..478dfd16ed 100644 --- a/version.props +++ b/version.props @@ -1,6 +1,6 @@  - 2.1.1 + 2.1.2 rtm $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final From 969f01c2e1514b91c3a4283bd4b2cb77b10ecf7d Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 11 Jul 2018 15:06:42 -0700 Subject: [PATCH 287/291] Reverting version from 2.1.2 back to 2.1.1 As a result of changing the way we apply servicing updates to aspnet core, this repo did not need the version bump because there are no planned product changes in this repo. --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 478dfd16ed..669c874829 100644 --- a/version.props +++ b/version.props @@ -1,6 +1,6 @@  - 2.1.2 + 2.1.1 rtm $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final From 8e6b116dd9a946360b132d8a3d9bc0eef7cf71b9 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 11 Jul 2018 18:49:53 -0700 Subject: [PATCH 288/291] Updating dependencies to 2.1.2 and adding a section for pinned variable versions --- build/dependencies.props | 15 +++++++++++---- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 0742b4f74c..eeaade410e 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,8 +2,10 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - 2.1.1-rtm-15793 + + + + 2.1.3-rtm-15802 2.1.1 2.1.1 2.1.1 @@ -11,7 +13,7 @@ 2.1.1 2.1.1 0.5.1 - 2.1.1 + 2.1.2 2.1.1 2.1.1 2.1.1 @@ -19,7 +21,7 @@ 2.1.1 2.1.1 2.0.0 - 2.1.1 + 2.1.2 2.1.1 15.6.1 2.0.3 @@ -28,5 +30,10 @@ 2.3.1 2.4.0-beta.1.build3945 + + + + + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index bc84e0cd53..251c227c83 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.1-rtm-15793 -commithash:988313f4b064d6c69fc6f7b845b6384a6af3447a +version:2.1.3-rtm-15802 +commithash:a7c08b45b440a7d2058a0aa1eaa3eb6ba811976a From 6ed63da79c1605b06e69c7f3976db4db99db8e2c Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 12 Jul 2018 11:58:46 -0700 Subject: [PATCH 289/291] Pin version variables to the ASP.NET Core 2.1.2 baseline This reverts our previous policy of cascading versions on all servicing updates. This moves variables into the 'pinned' section, and points them to the latest stable release (versions that were used at the time of the 2.1.2 release). --- build/dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index eeaade410e..72cad24822 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,7 +4,7 @@ - + 2.1.3-rtm-15802 2.1.1 2.1.1 From 019ba1722e9d100fc54f8ab60f12ac4f1b795f0b Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 1 Nov 2018 14:38:46 -0700 Subject: [PATCH 290/291] Remove unused M.A.Server.IIS package (#150) --- .../ServerComparison.TestSites.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj index ea1974de41..f3aa4898e5 100644 --- a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -13,9 +13,6 @@ - - - From 9ba11244f22c62aad75f68e789daf0c8d6f7e364 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Wed, 21 Nov 2018 09:58:26 -0800 Subject: [PATCH 291/291] Reorganize source code in preparation to move into aspnet/AspNetCore Prior to reorganization, this source code was found in https://github.com/aspnet/ServerTests/tree/019ba1722e9d100fc54f8ab60f12ac4f1b795f0b --- .appveyor.yml | 17 -- .gitattributes | 51 ---- .travis.yml | 29 --- CONTRIBUTING.md | 4 - LICENSE.txt | 14 -- NuGet.config | 7 - build.cmd | 2 - build.sh | 8 - korebuild-lock.txt | 2 - korebuild.json | 4 - run.cmd | 2 - run.ps1 | 196 --------------- run.sh | 231 ------------------ .gitignore => src/ServerTests/.gitignore | 0 .../ServerTests/Directory.Build.props | 0 .../ServerTests/Directory.Build.targets | 0 .../ServerTests/NuGetPackageVerifier.json | 0 README.md => src/ServerTests/README.md | 0 .../ServerTests/ServerTests.sln | 0 .../ServerTests/build}/dependencies.props | 0 {build => src/ServerTests/build}/repo.props | 0 .../ServerTests/build}/sources.props | 0 .../ServerTests/install-nginx.sh | 0 .../ServerTests/test}/Directory.Build.props | 0 .../HelloWorldTest.cs | 0 .../Helpers.cs | 0 .../Http.config | 0 .../NoCompression.conf | 0 .../NoCompression.config | 0 .../NtlmAuthentication.config | 0 .../NtlmAuthenticationTest.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../ResponseCompressionTests.cs | 0 .../ResponseTests.cs | 0 .../ServerComparison.FunctionalTests.csproj | 0 .../nginx.conf | 0 .../ServerComparison.TestSites/Program.cs | 0 .../Properties/launchSettings.json | 0 .../ServerComparison.TestSites.csproj | 0 .../StartupHelloWorld.cs | 0 .../StartupNtlmAuthentication.cs | 0 .../StartupResponseCompression.cs | 0 .../StartupResponses.cs | 0 .../ServerComparison.TestSites/web.config | 0 .../ServerTests/version.props | 0 45 files changed, 567 deletions(-) delete mode 100644 .appveyor.yml delete mode 100644 .gitattributes delete mode 100644 .travis.yml delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE.txt delete mode 100644 NuGet.config delete mode 100644 build.cmd delete mode 100755 build.sh delete mode 100644 korebuild-lock.txt delete mode 100644 korebuild.json delete mode 100644 run.cmd delete mode 100644 run.ps1 delete mode 100755 run.sh rename .gitignore => src/ServerTests/.gitignore (100%) rename Directory.Build.props => src/ServerTests/Directory.Build.props (100%) rename Directory.Build.targets => src/ServerTests/Directory.Build.targets (100%) rename NuGetPackageVerifier.json => src/ServerTests/NuGetPackageVerifier.json (100%) rename README.md => src/ServerTests/README.md (100%) rename ServerTests.sln => src/ServerTests/ServerTests.sln (100%) rename {build => src/ServerTests/build}/dependencies.props (100%) rename {build => src/ServerTests/build}/repo.props (100%) rename {build => src/ServerTests/build}/sources.props (100%) rename install-nginx.sh => src/ServerTests/install-nginx.sh (100%) mode change 100755 => 100644 rename {test => src/ServerTests/test}/Directory.Build.props (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/HelloWorldTest.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/Helpers.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/Http.config (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/NoCompression.conf (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/NoCompression.config (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/NtlmAuthentication.config (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/ResponseCompressionTests.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/ResponseTests.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj (100%) rename {test => src/ServerTests/test}/ServerComparison.FunctionalTests/nginx.conf (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/Program.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/Properties/launchSettings.json (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/ServerComparison.TestSites.csproj (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/StartupHelloWorld.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/StartupNtlmAuthentication.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/StartupResponseCompression.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/StartupResponses.cs (100%) rename {test => src/ServerTests/test}/ServerComparison.TestSites/web.config (100%) rename version.props => src/ServerTests/version.props (100%) diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 1de903ee67..0000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,17 +0,0 @@ -init: -- git config --global core.autocrlf true -branches: - only: - - dev - - /^release\/.*$/ - - /^(.*\/)?ci-.*$/ -environment: - global: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 -build_script: -- ps: .\run.ps1 default-build -clone_depth: 1 -test: 'off' -deploy: 'off' -os: Visual Studio 2017 diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 97b827b758..0000000000 --- a/.gitattributes +++ /dev/null @@ -1,51 +0,0 @@ -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain - -*.jpg binary -*.png binary -*.gif binary - -*.cs text=auto diff=csharp -*.vb text=auto -*.resx text=auto -*.c text=auto -*.cpp text=auto -*.cxx text=auto -*.h text=auto -*.hxx text=auto -*.py text=auto -*.rb text=auto -*.java text=auto -*.html text=auto -*.htm text=auto -*.css text=auto -*.scss text=auto -*.sass text=auto -*.less text=auto -*.js text=auto -*.lisp text=auto -*.clj text=auto -*.sql text=auto -*.php text=auto -*.lua text=auto -*.m text=auto -*.asm text=auto -*.erl text=auto -*.fs text=auto -*.fsx text=auto -*.hs text=auto - -*.csproj text=auto -*.vbproj text=auto -*.fsproj text=auto -*.dbproj text=auto -*.sln text=auto eol=crlf -*.sh eol=lf diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d7b744fc46..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: csharp -sudo: required -dist: trusty -env: - global: - - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - - DOTNET_CLI_TELEMETRY_OPTOUT: 1 -addons: - apt: - packages: - - libunwind8 -mono: none -os: -- linux -- osx -osx_image: xcode9.3beta -branches: - only: - - dev - - /^release\/.*$/ - - /^(.*\/)?ci-.*$/ -before_install: -- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl nginx; - ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib - /usr/local/lib/; else ./install-nginx.sh; fi -install: -- export PATH="$PATH:$HOME/nginxinstall/sbin/" -script: -- ./build.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 64ff041d5c..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,4 +0,0 @@ -Contributing -====== - -Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo. diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 7b2956ecee..0000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) .NET Foundation and Contributors - -All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. diff --git a/NuGet.config b/NuGet.config deleted file mode 100644 index e32bddfd51..0000000000 --- a/NuGet.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/build.cmd b/build.cmd deleted file mode 100644 index c0050bda12..0000000000 --- a/build.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE" diff --git a/build.sh b/build.sh deleted file mode 100755 index 98a4b22765..0000000000 --- a/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) -chmod +x "$DIR/run.sh"; sync -"$DIR/run.sh" default-build "$@" diff --git a/korebuild-lock.txt b/korebuild-lock.txt deleted file mode 100644 index 251c227c83..0000000000 --- a/korebuild-lock.txt +++ /dev/null @@ -1,2 +0,0 @@ -version:2.1.3-rtm-15802 -commithash:a7c08b45b440a7d2058a0aa1eaa3eb6ba811976a diff --git a/korebuild.json b/korebuild.json deleted file mode 100644 index 678d8bb948..0000000000 --- a/korebuild.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.1/tools/korebuild.schema.json", - "channel": "release/2.1" -} diff --git a/run.cmd b/run.cmd deleted file mode 100644 index d52d5c7e68..0000000000 --- a/run.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE" diff --git a/run.ps1 b/run.ps1 deleted file mode 100644 index 27dcf848f8..0000000000 --- a/run.ps1 +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env powershell -#requires -version 4 - -<# -.SYNOPSIS -Executes KoreBuild commands. - -.DESCRIPTION -Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`. - -.PARAMETER Command -The KoreBuild command to run. - -.PARAMETER Path -The folder to build. Defaults to the folder containing this script. - -.PARAMETER Channel -The channel of KoreBuild to download. Overrides the value from the config file. - -.PARAMETER DotNetHome -The directory where .NET Core tools will be stored. - -.PARAMETER ToolsSource -The base url where build tools can be downloaded. Overrides the value from the config file. - -.PARAMETER Update -Updates KoreBuild to the latest version even if a lock file is present. - -.PARAMETER ConfigFile -The path to the configuration file that stores values. Defaults to korebuild.json. - -.PARAMETER ToolsSourceSuffix -The Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores. - -.PARAMETER Arguments -Arguments to be passed to the command - -.NOTES -This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be. -When the lockfile is not present, KoreBuild will create one using latest available version from $Channel. - -The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set -in the file are overridden by command line parameters. - -.EXAMPLE -Example config file: -```json -{ - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev", - "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" -} -``` -#> -[CmdletBinding(PositionalBinding = $false)] -param( - [Parameter(Mandatory = $true, Position = 0)] - [string]$Command, - [string]$Path = $PSScriptRoot, - [Alias('c')] - [string]$Channel, - [Alias('d')] - [string]$DotNetHome, - [Alias('s')] - [string]$ToolsSource, - [Alias('u')] - [switch]$Update, - [string]$ConfigFile, - [string]$ToolsSourceSuffix, - [Parameter(ValueFromRemainingArguments = $true)] - [string[]]$Arguments -) - -Set-StrictMode -Version 2 -$ErrorActionPreference = 'Stop' - -# -# Functions -# - -function Get-KoreBuild { - - $lockFile = Join-Path $Path 'korebuild-lock.txt' - - if (!(Test-Path $lockFile) -or $Update) { - Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile $ToolsSourceSuffix - } - - $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 - if (!$version) { - Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'" - } - $version = $version.TrimStart('version:').Trim() - $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) - - if (!(Test-Path $korebuildPath)) { - Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" - New-Item -ItemType Directory -Path $korebuildPath | Out-Null - $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip" - - try { - $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" - Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix - if (Get-Command -Name 'Expand-Archive' -ErrorAction Ignore) { - # Use built-in commands where possible as they are cross-plat compatible - Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath - } - else { - # Fallback to old approach for old installations of PowerShell - Add-Type -AssemblyName System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath) - } - } - catch { - Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore - throw - } - finally { - Remove-Item $tmpfile -ErrorAction Ignore - } - } - - return $korebuildPath -} - -function Join-Paths([string]$path, [string[]]$childPaths) { - $childPaths | ForEach-Object { $path = Join-Path $path $_ } - return $path -} - -function Get-RemoteFile([string]$RemotePath, [string]$LocalPath, [string]$RemoteSuffix) { - if ($RemotePath -notlike 'http*') { - Copy-Item $RemotePath $LocalPath - return - } - - $retries = 10 - while ($retries -gt 0) { - $retries -= 1 - try { - Invoke-WebRequest -UseBasicParsing -Uri $($RemotePath + $RemoteSuffix) -OutFile $LocalPath - return - } - catch { - Write-Verbose "Request failed. $retries retries remaining" - } - } - - Write-Error "Download failed: '$RemotePath'." -} - -# -# Main -# - -# Load configuration or set defaults - -$Path = Resolve-Path $Path -if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' } - -if (Test-Path $ConfigFile) { - try { - $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json - if ($config) { - if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } - if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} - } - } - catch { - Write-Warning "$ConfigFile could not be read. Its settings will be ignored." - Write-Warning $Error[0] - } -} - -if (!$DotNetHome) { - $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } ` - elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} ` - elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}` - else { Join-Path $PSScriptRoot '.dotnet'} -} - -if (!$Channel) { $Channel = 'dev' } -if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } - -# Execute - -$korebuildPath = Get-KoreBuild -Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') - -try { - Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile - Invoke-KoreBuildCommand $Command @Arguments -} -finally { - Remove-Module 'KoreBuild' -ErrorAction Ignore -} diff --git a/run.sh b/run.sh deleted file mode 100755 index 834961fc3a..0000000000 --- a/run.sh +++ /dev/null @@ -1,231 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# -# variables -# - -RESET="\033[0m" -RED="\033[0;31m" -YELLOW="\033[0;33m" -MAGENTA="\033[0;95m" -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" -verbose=false -update=false -repo_path="$DIR" -channel='' -tools_source='' -tools_source_suffix='' - -# -# Functions -# -__usage() { - echo "Usage: $(basename "${BASH_SOURCE[0]}") command [options] [[--] ...]" - echo "" - echo "Arguments:" - echo " command The command to be run." - echo " ... Arguments passed to the command. Variable number of arguments allowed." - echo "" - echo "Options:" - echo " --verbose Show verbose output." - echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." - echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." - echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." - echo " --path The directory to build. Defaults to the directory containing the script." - echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." - echo " --tools-source-suffix|-ToolsSourceSuffix The suffix to append to tools-source. Useful for query strings." - echo " -u|--update Update to the latest KoreBuild even if the lock file is present." - echo "" - echo "Description:" - echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." - echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." - - if [[ "${1:-}" != '--no-exit' ]]; then - exit 2 - fi -} - -get_korebuild() { - local version - local lock_file="$repo_path/korebuild-lock.txt" - if [ ! -f "$lock_file" ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" "$tools_source_suffix" - fi - version="$(grep 'version:*' -m 1 "$lock_file")" - if [[ "$version" == '' ]]; then - __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" - return 1 - fi - version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" - local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" - - { - if [ ! -d "$korebuild_path" ]; then - mkdir -p "$korebuild_path" - local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" - tmpfile="$(mktemp)" - echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" - if __get_remote_file "$remote_path" "$tmpfile" "$tools_source_suffix"; then - unzip -q -d "$korebuild_path" "$tmpfile" - fi - rm "$tmpfile" || true - fi - - source "$korebuild_path/KoreBuild.sh" - } || { - if [ -d "$korebuild_path" ]; then - echo "Cleaning up after failed installation" - rm -rf "$korebuild_path" || true - fi - return 1 - } -} - -__error() { - echo -e "${RED}error: $*${RESET}" 1>&2 -} - -__warn() { - echo -e "${YELLOW}warning: $*${RESET}" -} - -__machine_has() { - hash "$1" > /dev/null 2>&1 - return $? -} - -__get_remote_file() { - local remote_path=$1 - local local_path=$2 - local remote_path_suffix=$3 - - if [[ "$remote_path" != 'http'* ]]; then - cp "$remote_path" "$local_path" - return 0 - fi - - local failed=false - if __machine_has wget; then - wget --tries 10 --quiet -O "$local_path" "${remote_path}${remote_path_suffix}" || failed=true - else - failed=true - fi - - if [ "$failed" = true ] && __machine_has curl; then - failed=false - curl --retry 10 -sSL -f --create-dirs -o "$local_path" "${remote_path}${remote_path_suffix}" || failed=true - fi - - if [ "$failed" = true ]; then - __error "Download failed: $remote_path" 1>&2 - return 1 - fi -} - -# -# main -# - -command="${1:-}" -shift - -while [[ $# -gt 0 ]]; do - case $1 in - -\?|-h|--help) - __usage --no-exit - exit 0 - ;; - -c|--channel|-Channel) - shift - channel="${1:-}" - [ -z "$channel" ] && __usage - ;; - --config-file|-ConfigFile) - shift - config_file="${1:-}" - [ -z "$config_file" ] && __usage - if [ ! -f "$config_file" ]; then - __error "Invalid value for --config-file. $config_file does not exist." - exit 1 - fi - ;; - -d|--dotnet-home|-DotNetHome) - shift - DOTNET_HOME="${1:-}" - [ -z "$DOTNET_HOME" ] && __usage - ;; - --path|-Path) - shift - repo_path="${1:-}" - [ -z "$repo_path" ] && __usage - ;; - -s|--tools-source|-ToolsSource) - shift - tools_source="${1:-}" - [ -z "$tools_source" ] && __usage - ;; - --tools-source-suffix|-ToolsSourceSuffix) - shift - tools_source_suffix="${1:-}" - [ -z "$tools_source_suffix" ] && __usage - ;; - -u|--update|-Update) - update=true - ;; - --verbose|-Verbose) - verbose=true - ;; - --) - shift - break - ;; - *) - break - ;; - esac - shift -done - -if ! __machine_has unzip; then - __error 'Missing required command: unzip' - exit 1 -fi - -if ! __machine_has curl && ! __machine_has wget; then - __error 'Missing required command. Either wget or curl is required.' - exit 1 -fi - -[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json" -if [ -f "$config_file" ]; then - if __machine_has jq ; then - if jq '.' "$config_file" >/dev/null ; then - config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" - config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" - else - __warn "$config_file is invalid JSON. Its settings will be ignored." - fi - elif __machine_has python ; then - if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then - config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" - config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" - else - __warn "$config_file is invalid JSON. Its settings will be ignored." - fi - else - __warn 'Missing required command: jq or pyton. Could not parse the JSON file. Its settings will be ignored.' - fi - - [ ! -z "${config_channel:-}" ] && channel="$config_channel" - [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" -fi - -[ -z "$channel" ] && channel='dev' -[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' - -get_korebuild -set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" -invoke_korebuild_command "$command" "$@" diff --git a/.gitignore b/src/ServerTests/.gitignore similarity index 100% rename from .gitignore rename to src/ServerTests/.gitignore diff --git a/Directory.Build.props b/src/ServerTests/Directory.Build.props similarity index 100% rename from Directory.Build.props rename to src/ServerTests/Directory.Build.props diff --git a/Directory.Build.targets b/src/ServerTests/Directory.Build.targets similarity index 100% rename from Directory.Build.targets rename to src/ServerTests/Directory.Build.targets diff --git a/NuGetPackageVerifier.json b/src/ServerTests/NuGetPackageVerifier.json similarity index 100% rename from NuGetPackageVerifier.json rename to src/ServerTests/NuGetPackageVerifier.json diff --git a/README.md b/src/ServerTests/README.md similarity index 100% rename from README.md rename to src/ServerTests/README.md diff --git a/ServerTests.sln b/src/ServerTests/ServerTests.sln similarity index 100% rename from ServerTests.sln rename to src/ServerTests/ServerTests.sln diff --git a/build/dependencies.props b/src/ServerTests/build/dependencies.props similarity index 100% rename from build/dependencies.props rename to src/ServerTests/build/dependencies.props diff --git a/build/repo.props b/src/ServerTests/build/repo.props similarity index 100% rename from build/repo.props rename to src/ServerTests/build/repo.props diff --git a/build/sources.props b/src/ServerTests/build/sources.props similarity index 100% rename from build/sources.props rename to src/ServerTests/build/sources.props diff --git a/install-nginx.sh b/src/ServerTests/install-nginx.sh old mode 100755 new mode 100644 similarity index 100% rename from install-nginx.sh rename to src/ServerTests/install-nginx.sh diff --git a/test/Directory.Build.props b/src/ServerTests/test/Directory.Build.props similarity index 100% rename from test/Directory.Build.props rename to src/ServerTests/test/Directory.Build.props diff --git a/test/ServerComparison.FunctionalTests/HelloWorldTest.cs b/src/ServerTests/test/ServerComparison.FunctionalTests/HelloWorldTest.cs similarity index 100% rename from test/ServerComparison.FunctionalTests/HelloWorldTest.cs rename to src/ServerTests/test/ServerComparison.FunctionalTests/HelloWorldTest.cs diff --git a/test/ServerComparison.FunctionalTests/Helpers.cs b/src/ServerTests/test/ServerComparison.FunctionalTests/Helpers.cs similarity index 100% rename from test/ServerComparison.FunctionalTests/Helpers.cs rename to src/ServerTests/test/ServerComparison.FunctionalTests/Helpers.cs diff --git a/test/ServerComparison.FunctionalTests/Http.config b/src/ServerTests/test/ServerComparison.FunctionalTests/Http.config similarity index 100% rename from test/ServerComparison.FunctionalTests/Http.config rename to src/ServerTests/test/ServerComparison.FunctionalTests/Http.config diff --git a/test/ServerComparison.FunctionalTests/NoCompression.conf b/src/ServerTests/test/ServerComparison.FunctionalTests/NoCompression.conf similarity index 100% rename from test/ServerComparison.FunctionalTests/NoCompression.conf rename to src/ServerTests/test/ServerComparison.FunctionalTests/NoCompression.conf diff --git a/test/ServerComparison.FunctionalTests/NoCompression.config b/src/ServerTests/test/ServerComparison.FunctionalTests/NoCompression.config similarity index 100% rename from test/ServerComparison.FunctionalTests/NoCompression.config rename to src/ServerTests/test/ServerComparison.FunctionalTests/NoCompression.config diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthentication.config b/src/ServerTests/test/ServerComparison.FunctionalTests/NtlmAuthentication.config similarity index 100% rename from test/ServerComparison.FunctionalTests/NtlmAuthentication.config rename to src/ServerTests/test/ServerComparison.FunctionalTests/NtlmAuthentication.config diff --git a/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs b/src/ServerTests/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs similarity index 100% rename from test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs rename to src/ServerTests/test/ServerComparison.FunctionalTests/NtlmAuthenticationTest.cs diff --git a/test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs b/src/ServerTests/test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs similarity index 100% rename from test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs rename to src/ServerTests/test/ServerComparison.FunctionalTests/Properties/AssemblyInfo.cs diff --git a/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs b/src/ServerTests/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs similarity index 100% rename from test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs rename to src/ServerTests/test/ServerComparison.FunctionalTests/ResponseCompressionTests.cs diff --git a/test/ServerComparison.FunctionalTests/ResponseTests.cs b/src/ServerTests/test/ServerComparison.FunctionalTests/ResponseTests.cs similarity index 100% rename from test/ServerComparison.FunctionalTests/ResponseTests.cs rename to src/ServerTests/test/ServerComparison.FunctionalTests/ResponseTests.cs diff --git a/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj b/src/ServerTests/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj similarity index 100% rename from test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj rename to src/ServerTests/test/ServerComparison.FunctionalTests/ServerComparison.FunctionalTests.csproj diff --git a/test/ServerComparison.FunctionalTests/nginx.conf b/src/ServerTests/test/ServerComparison.FunctionalTests/nginx.conf similarity index 100% rename from test/ServerComparison.FunctionalTests/nginx.conf rename to src/ServerTests/test/ServerComparison.FunctionalTests/nginx.conf diff --git a/test/ServerComparison.TestSites/Program.cs b/src/ServerTests/test/ServerComparison.TestSites/Program.cs similarity index 100% rename from test/ServerComparison.TestSites/Program.cs rename to src/ServerTests/test/ServerComparison.TestSites/Program.cs diff --git a/test/ServerComparison.TestSites/Properties/launchSettings.json b/src/ServerTests/test/ServerComparison.TestSites/Properties/launchSettings.json similarity index 100% rename from test/ServerComparison.TestSites/Properties/launchSettings.json rename to src/ServerTests/test/ServerComparison.TestSites/Properties/launchSettings.json diff --git a/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/src/ServerTests/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj similarity index 100% rename from test/ServerComparison.TestSites/ServerComparison.TestSites.csproj rename to src/ServerTests/test/ServerComparison.TestSites/ServerComparison.TestSites.csproj diff --git a/test/ServerComparison.TestSites/StartupHelloWorld.cs b/src/ServerTests/test/ServerComparison.TestSites/StartupHelloWorld.cs similarity index 100% rename from test/ServerComparison.TestSites/StartupHelloWorld.cs rename to src/ServerTests/test/ServerComparison.TestSites/StartupHelloWorld.cs diff --git a/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs b/src/ServerTests/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs similarity index 100% rename from test/ServerComparison.TestSites/StartupNtlmAuthentication.cs rename to src/ServerTests/test/ServerComparison.TestSites/StartupNtlmAuthentication.cs diff --git a/test/ServerComparison.TestSites/StartupResponseCompression.cs b/src/ServerTests/test/ServerComparison.TestSites/StartupResponseCompression.cs similarity index 100% rename from test/ServerComparison.TestSites/StartupResponseCompression.cs rename to src/ServerTests/test/ServerComparison.TestSites/StartupResponseCompression.cs diff --git a/test/ServerComparison.TestSites/StartupResponses.cs b/src/ServerTests/test/ServerComparison.TestSites/StartupResponses.cs similarity index 100% rename from test/ServerComparison.TestSites/StartupResponses.cs rename to src/ServerTests/test/ServerComparison.TestSites/StartupResponses.cs diff --git a/test/ServerComparison.TestSites/web.config b/src/ServerTests/test/ServerComparison.TestSites/web.config similarity index 100% rename from test/ServerComparison.TestSites/web.config rename to src/ServerTests/test/ServerComparison.TestSites/web.config diff --git a/version.props b/src/ServerTests/version.props similarity index 100% rename from version.props rename to src/ServerTests/version.props