Functional test update after Hosting API change

This commit is contained in:
John Luo 2015-12-21 14:40:36 -08:00
parent 862d52677f
commit 73fb78c47d
7 changed files with 74 additions and 36 deletions

View File

@ -69,7 +69,7 @@ namespace ServerComparison.FunctionalTests
var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture)
{ {
ApplicationBaseUriHint = applicationBaseUrl, ApplicationBaseUriHint = applicationBaseUrl,
Command = serverType == ServerType.WebListener ? "weblistener" : "web", Command = "web",
EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld', EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld',
ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null,
SiteName = "HttpTestSite", // This is configured in the Http.config SiteName = "HttpTestSite", // This is configured in the Http.config

View File

@ -36,7 +36,7 @@ namespace ServerComparison.FunctionalTests
var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture) var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(), serverType, runtimeFlavor, architecture)
{ {
ApplicationBaseUriHint = applicationBaseUrl, ApplicationBaseUriHint = applicationBaseUrl,
Command = serverType == ServerType.WebListener ? "weblistener" : "web", Command = "web",
EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication' EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication'
ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null, ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null,
SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config

View File

@ -116,7 +116,7 @@ namespace ServerComparison.FunctionalTests
{ {
ApplicationBaseUriHint = applicationBaseUrl, ApplicationBaseUriHint = applicationBaseUrl,
EnvironmentName = "Responses", EnvironmentName = "Responses",
Command = serverType == ServerType.WebListener ? "weblistener" : "web", Command = "web",
ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, ApplicationHostConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null,
SiteName = "HttpTestSite", // This is configured in the Http.config SiteName = "HttpTestSite", // This is configured in the Http.config
}; };

View File

@ -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();
}
}
}

View File

@ -1,10 +1,24 @@
{ {
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:39982/",
"sslPort": 0
}
},
"profiles": { "profiles": {
"IIS Express": { "IIS Express": {
"commandName": "IISExpress", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNET_ENV": "HelloWorld" "ASPNET_ENVIRONMENT": "HelloWorld"
}
},
"web": {
"commandName": "web",
"environmentVariables": {
"ASPNET_ENVIRONMENT": "HelloWorld"
} }
} }
} }

View File

@ -0,0 +1,3 @@
{
"server": "Microsoft.AspNet.Server.Kestrel"
}

View File

@ -1,38 +1,39 @@
{ {
"webroot": "wwwroot", "version": "1.0.0-*",
"version": "1.0.0-*",
"dependencies": { "dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*",
"Microsoft.AspNet.WebUtilities": "1.0.0-*", "Microsoft.AspNet.WebUtilities": "1.0.0-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-*", "Microsoft.Extensions.Configuration.Json": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*",
"Microsoft.Net.Http.Headers": "1.0.0-*" "Microsoft.Net.Http.Headers": "1.0.0-*"
}, },
"commands": { "commands": {
"kestrel": "Microsoft.AspNet.Server.Kestrel", "web": "ServerComparison.TestSites"
"web": "Microsoft.AspNet.Server.Kestrel", },
"weblistener": "Microsoft.AspNet.Server.WebListener"
},
"frameworks": { "compilationOptions": {
"dnx451": { }, "emitEntryPoint": true
"dnxcore50": { } },
},
"publishExclude": [ "frameworks": {
"node_modules", "dnx451": { },
"bower_components", "dnxcore50": { }
"**.xproj", },
"**.user",
"**.vspscc" "publishExclude": [
], "node_modules",
"exclude": [ "bower_components",
"wwwroot", "**.xproj",
"node_modules", "**.user",
"bower_components" "**.vspscc"
] ],
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
]
} }