Updating Xunit and dotnet versions (#143)
This commit is contained in:
parent
2e540341db
commit
f130330db8
|
|
@ -2,7 +2,8 @@
|
|||
<PropertyGroup>
|
||||
<AspNetCoreVersion>1.2.0-*</AspNetCoreVersion>
|
||||
<InternalAspNetCoreSdkVersion>2.1.1-*</InternalAspNetCoreSdkVersion>
|
||||
<TestSdkVersion>15.3.0-*</TestSdkVersion>
|
||||
<XunitVersion>2.3.0-beta2-*</XunitVersion>
|
||||
<TestSdkVersion>15.3.0</TestSdkVersion>
|
||||
<XunitAnalyzersVersion>0.6.1</XunitAnalyzersVersion>
|
||||
<XunitVersion>2.3.0-beta4-build3742</XunitVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -1063,17 +1063,22 @@ Finished:
|
|||
if (strEventMsg.IsEmpty())
|
||||
{
|
||||
if (!fDonePrepareCommandLine)
|
||||
{
|
||||
|
||||
strEventMsg.SafeSnwprintf(
|
||||
m_struAppFullPath.QueryStr(),
|
||||
ASPNETCORE_EVENT_PROCESS_START_INTERNAL_ERROR_MSG,
|
||||
hr);
|
||||
m_struAppFullPath.QueryStr(),
|
||||
ASPNETCORE_EVENT_PROCESS_START_INTERNAL_ERROR_MSG,
|
||||
hr);
|
||||
}
|
||||
else
|
||||
{
|
||||
strEventMsg.SafeSnwprintf(
|
||||
ASPNETCORE_EVENT_PROCESS_START_POSTCREATE_ERROR_MSG,
|
||||
m_struAppFullPath.QueryStr(),
|
||||
m_pszRootApplicationPath.QueryStr(),
|
||||
struCommandLine.QueryStr(),
|
||||
hr);
|
||||
}
|
||||
}
|
||||
|
||||
apsz[0] = strEventMsg.QueryStr();
|
||||
|
|
|
|||
|
|
@ -196,9 +196,9 @@ namespace AspNetCoreModule.Test.Framework
|
|||
}
|
||||
|
||||
//
|
||||
// Currently we use DotnetCore v1.0
|
||||
// Currently we use DotnetCore v2.0
|
||||
//
|
||||
string publishPath = Path.Combine(srcPath, "bin", "Debug", "netcoreapp1.0", "publish");
|
||||
string publishPath = Path.Combine(srcPath, "bin", "Debug", "netcoreapp2.0", "publish");
|
||||
string publishPathOutput = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemDrive%") + @"\", "inetpub", "ANCMTest", "publishPathOutput");
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -898,8 +898,8 @@ namespace AspNetCoreModule.Test
|
|||
requestHeaders = await GetResponse(testSite.AspNetCoreApp.GetUri("DumpRequestHeaders"), HttpStatusCode.OK);
|
||||
if (enabledForwardWindowsAuthToken)
|
||||
{
|
||||
string expectedHeaderName = "MS-ASPNETCORE-WINAUTHTOKEN";
|
||||
Assert.Contains(expectedHeaderName, requestHeaders.ToUpper());
|
||||
|
||||
Assert.Contains("MS-ASPNETCORE-WINAUTHTOKEN", requestHeaders.ToUpper());
|
||||
|
||||
result = await GetResponse(testSite.AspNetCoreApp.GetUri("ImpersonateMiddleware"), HttpStatusCode.OK);
|
||||
bool compare = false;
|
||||
|
|
@ -1376,8 +1376,8 @@ namespace AspNetCoreModule.Test
|
|||
// Verify https request with client certificate includes the certificate header "MS-ASPNETCORE-CLIENTCERT"
|
||||
Uri targetHttpsUriForDumpRequestHeaders = testSite.AspNetCoreApp.GetUri("DumpRequestHeaders", sslPort, protocol: "https");
|
||||
string outputRawContent = TestUtility.RunPowershellScript("( invoke-webrequest " + targetHttpsUriForDumpRequestHeaders.OriginalString + " -CertificateThumbprint " + thumbPrintForClientAuthentication + ").RawContent.ToString()");
|
||||
string expectedHeaderName = "MS-ASPNETCORE-CLIENTCERT";
|
||||
Assert.Contains(expectedHeaderName, outputRawContent);
|
||||
|
||||
Assert.Contains("MS-ASPNETCORE-CLIENTCERT", outputRawContent);
|
||||
|
||||
// Get the value of MS-ASPNETCORE-CLIENTCERT request header again and verify it is matched to its configured public key
|
||||
Uri targetHttpsUriForCLIENTCERTRequestHeader = testSite.AspNetCoreApp.GetUri("GetRequestHeaderValueMS-ASPNETCORE-CLIENTCERT", sslPort, protocol: "https");
|
||||
|
|
@ -2337,7 +2337,6 @@ namespace AspNetCoreModule.Test
|
|||
}
|
||||
TestUtility.LogInformation(responseText);
|
||||
TestUtility.LogInformation(responseStatus);
|
||||
throw;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
<RuntimeFrameworkVersion>1.0.5</RuntimeFrameworkVersion>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.WebSockets.Server" Version="0.1.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.WebListener" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.ResponseCaching" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Https;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Net.Http.Server;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading;
|
||||
using System.Net;
|
||||
|
||||
namespace AspnetCoreModule.TestSites.Standard
|
||||
{
|
||||
|
|
@ -46,14 +46,7 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
builder = new WebHostBuilder()
|
||||
.UseConfiguration(config)
|
||||
.UseIISIntegration()
|
||||
.UseKestrel(options =>
|
||||
{
|
||||
HttpsConnectionFilterOptions httpsoptions = new HttpsConnectionFilterOptions();
|
||||
httpsoptions.ServerCertificate = _x509Certificate2;
|
||||
httpsoptions.ClientCertificateMode = ClientCertificateMode.RequireCertificate;
|
||||
httpsoptions.CheckCertificateRevocation = false;
|
||||
options.UseHttps(httpsoptions);
|
||||
})
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>();
|
||||
}
|
||||
else if (startUpClassString == "StartupCompressionCaching")
|
||||
|
|
@ -117,32 +110,7 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
Startup.SleeptimeWhileClosing = Convert.ToInt32(shutdownDelay);
|
||||
}
|
||||
|
||||
// Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution.
|
||||
if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal))
|
||||
{
|
||||
if (string.Equals(builder.GetSetting("environment") ??
|
||||
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
|
||||
"NtlmAuthentication", System.StringComparison.Ordinal))
|
||||
{
|
||||
// Set up NTLM authentication for WebListener as follows.
|
||||
// For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or
|
||||
// modify the applicationHost.config to enable NTLM.
|
||||
builder.UseWebListener(options =>
|
||||
{
|
||||
options.ListenerSettings.Authentication.AllowAnonymous = true;
|
||||
options.ListenerSettings.Authentication.Schemes =
|
||||
AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.UseWebListener();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.UseKestrel();
|
||||
}
|
||||
builder.UseKestrel();
|
||||
|
||||
var host = builder.Build();
|
||||
AappLifetime = (IApplicationLifetime)host.Services.GetService(typeof(IApplicationLifetime));
|
||||
|
|
@ -152,7 +120,6 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
{
|
||||
GracefulShutdownDelayTime = Convert.ToInt32(gracefulShutdownDelay);
|
||||
}
|
||||
|
||||
AappLifetime.ApplicationStarted.Register(
|
||||
() => {
|
||||
Thread.Sleep(1000);
|
||||
|
|
|
|||
|
|
@ -28,9 +28,6 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.Configure<IISOptions>(options => {
|
||||
// Considering the default value of ForwardWindowsAuthentication is true,
|
||||
// the below line is not required at present, however keeping in case the default value is changed later.
|
||||
options.ForwardWindowsAuthentication = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +70,6 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
{
|
||||
app.UseWebSockets(new WebSocketOptions
|
||||
{
|
||||
ReplaceFeature = true
|
||||
});
|
||||
|
||||
subApp.Use(async (context, next) =>
|
||||
|
|
@ -96,7 +92,6 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
{
|
||||
app.UseWebSockets(new WebSocketOptions
|
||||
{
|
||||
ReplaceFeature = true
|
||||
});
|
||||
|
||||
subApp.Use(async (context, next) =>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
@ -47,18 +48,19 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
}
|
||||
else
|
||||
{
|
||||
return context.Authentication.ChallengeAsync();
|
||||
return context.ChallengeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
if (context.Request.Path.Equals("/Forbidden"))
|
||||
{
|
||||
return context.Authentication.ForbidAsync(Microsoft.AspNetCore.Http.Authentication.AuthenticationManager.AutomaticScheme);
|
||||
return context.ForbidAsync();
|
||||
|
||||
}
|
||||
|
||||
if (context.Request.Path.Equals("/AutoForbid"))
|
||||
{
|
||||
return context.Authentication.ChallengeAsync();
|
||||
return context.ChallengeAsync();
|
||||
}
|
||||
|
||||
if (context.Request.Path.Equals("/RestrictedNegotiate"))
|
||||
|
|
@ -69,7 +71,7 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
}
|
||||
else
|
||||
{
|
||||
return context.Authentication.ChallengeAsync("Negotiate");
|
||||
return context.ChallengeAsync("Negotiate");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +83,7 @@ namespace AspnetCoreModule.TestSites.Standard
|
|||
}
|
||||
else
|
||||
{
|
||||
return context.Authentication.ChallengeAsync("NTLM");
|
||||
return context.ChallengeAsync("NTLM");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue