From b4b671556a0b7d6d647a6f8864e4b14c1e38dc53 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Thu, 30 Mar 2017 15:31:07 -0700 Subject: [PATCH] fix nginx deployer (#998) * fix nginx deployer * pr feedback --- .../Deployers/NginxDeployer.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/NginxDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/NginxDeployer.cs index fb881f7710..41d9860966 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/NginxDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/NginxDeployer.cs @@ -29,16 +29,18 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting using (Logger.BeginScope("Deploy")) { _configFile = Path.GetTempFileName(); - var uri = new Uri(DeploymentParameters.ApplicationBaseUriHint); + var uri = string.IsNullOrEmpty(DeploymentParameters.ApplicationBaseUriHint) ? + TestUriHelper.BuildTestUri() : + new Uri(DeploymentParameters.ApplicationBaseUriHint); - var redirectUri = $"http://localhost:{TestUriHelper.GetNextPort()}"; + var redirectUri = TestUriHelper.BuildTestUri(); if (DeploymentParameters.PublishApplicationBeforeDeployment) { DotnetPublish(); } - var (appUri, exitToken) = await StartSelfHostAsync(new Uri(redirectUri)); + var (appUri, exitToken) = await StartSelfHostAsync(redirectUri); SetupNginx(appUri.ToString(), uri);