From 673617f3dd19479b54674ad1e37fd47dd4a3d26f Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 28 Sep 2015 14:03:00 -0700 Subject: [PATCH] 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-*",