Fix win7 test again (#1187)

This commit is contained in:
Pavel Krymets 2018-08-09 10:08:44 -07:00 committed by GitHub
parent d7ad4c79ee
commit e6330ab19b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View File

@ -345,6 +345,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
.RequiredElement("applicationPools") .RequiredElement("applicationPools")
.RequiredElement("add"); .RequiredElement("add");
if (DeploymentParameters.EnvironmentVariables.Any())
{
var environmentVariables = pool var environmentVariables = pool
.GetOrAdd("environmentVariables"); .GetOrAdd("environmentVariables");
@ -355,6 +357,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
.SetAttributeValue("value", tuple.Value); .SetAttributeValue("value", tuple.Value);
} }
}
RunServerConfigActions(config, contentRoot); RunServerConfigActions(config, contentRoot);
} }

View File

@ -22,7 +22,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
protected ApplicationDeployer CreateDeployer(IISDeploymentParameters parameters) protected ApplicationDeployer CreateDeployer(IISDeploymentParameters parameters)
{ {
if (!parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable)) if (parameters.ServerType == ServerType.IISExpress &&
!parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
{ {
parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console"; parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
} }