Use dynamic ports for Https/Ntlm tests (#874)
This commit is contained in:
parent
e5505ceefc
commit
de197bfcd1
|
|
@ -6,6 +6,7 @@ using System.Security.Cryptography.X509Certificates;
|
|||
using System.Threading.Tasks;
|
||||
using IISIntegration.FunctionalTests.Utilities;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting.Common;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
|
@ -30,10 +31,11 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
[MemberData(nameof(TestVariants))]
|
||||
public async Task HttpsHelloWorld(TestVariant variant)
|
||||
{
|
||||
var port = TestPortHelper.GetNextSSLPort();
|
||||
var deploymentParameters = new DeploymentParameters(variant)
|
||||
{
|
||||
ApplicationPath = Helpers.GetOutOfProcessTestSitesPath(),
|
||||
ApplicationBaseUriHint = "https://localhost:44394/",
|
||||
ApplicationBaseUriHint = $"https://localhost:{port}/",
|
||||
ServerConfigTemplateContent = GetHttpsServerConfig()
|
||||
};
|
||||
|
||||
|
|
@ -53,7 +55,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
[MemberData(nameof(TestVariants))]
|
||||
public Task HttpsHelloWorld_NoClientCert(TestVariant variant)
|
||||
{
|
||||
return HttpsHelloWorldCerts(variant, port: 44397, sendClientCert: false);
|
||||
return HttpsHelloWorldCerts(variant, sendClientCert: false);
|
||||
}
|
||||
|
||||
#pragma warning disable xUnit1004 // Test methods should not be skipped
|
||||
|
|
@ -62,11 +64,12 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
#pragma warning restore xUnit1004 // Test methods should not be skipped
|
||||
public Task HttpsHelloWorld_ClientCert(TestVariant variant)
|
||||
{
|
||||
return HttpsHelloWorldCerts(variant, port: 44301, sendClientCert: true);
|
||||
return HttpsHelloWorldCerts(variant, sendClientCert: true);
|
||||
}
|
||||
|
||||
private async Task HttpsHelloWorldCerts(TestVariant variant, int port, bool sendClientCert)
|
||||
private async Task HttpsHelloWorldCerts(TestVariant variant, bool sendClientCert)
|
||||
{
|
||||
var port = TestPortHelper.GetNextSSLPort();
|
||||
var deploymentParameters = new DeploymentParameters(variant)
|
||||
{
|
||||
ApplicationPath = Helpers.GetOutOfProcessTestSitesPath(),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// 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 System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -31,7 +30,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
var deploymentParameters = new DeploymentParameters(variant)
|
||||
{
|
||||
ApplicationPath = Helpers.GetOutOfProcessTestSitesPath(),
|
||||
ApplicationBaseUriHint = "http://localhost:5052"
|
||||
ApplicationBaseUriHint = $"http://localhost:0/",
|
||||
};
|
||||
|
||||
var result = await DeployAsync(deploymentParameters);
|
||||
|
|
|
|||
Loading…
Reference in New Issue