Adds HostingModel as an extra DeploymentParameter (#1261)
This commit is contained in:
parent
a78b9c7490
commit
40bd6e560e
|
|
@ -106,6 +106,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
|
||||
public string PublishedApplicationRootPath { get; set; }
|
||||
|
||||
public HostingModel HostingModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Environment variables to be set before starting the host.
|
||||
/// Not applicable for IIS Scenarios.
|
||||
|
|
|
|||
|
|
@ -0,0 +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.
|
||||
|
||||
namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
||||
{
|
||||
public enum HostingModel
|
||||
{
|
||||
OutOfProcess,
|
||||
InProcess
|
||||
}
|
||||
}
|
||||
|
|
@ -142,6 +142,13 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
|
||||
DeploymentParameters.ServerConfigLocation = Path.GetTempFileName();
|
||||
|
||||
if (serverConfig.Contains("[HostingModel]"))
|
||||
{
|
||||
var hostingModel = DeploymentParameters.HostingModel.ToString();
|
||||
serverConfig.Replace("[HostingModel]", hostingModel);
|
||||
Logger.LogDebug("Writing HostingModel '{hostingModel}' to config", hostingModel);
|
||||
}
|
||||
|
||||
Logger.LogDebug("Saving Config to {configPath}", DeploymentParameters.ServerConfigLocation);
|
||||
|
||||
if (Logger.IsEnabled(LogLevel.Trace))
|
||||
|
|
|
|||
Loading…
Reference in New Issue