Merge branch 'release/2.2' into master

- no-ops except for
  - Update PatchConfig.props (2835f85b6c)
  - Add some additional logging to ErrorPageMiddlewareWebSite (#8049) (aka 1ca6202e7e)
  - Put MVC's functional tests in a separate test group (#8118) (aka db3795b368)
- ignore the build queue (4f2a0edc97) change because we're not hitting Linux resource issues in `master` branch
- ignore baseline test changes (5661c41909 and d2a4435ac8) because they're not applicable in `master`
This commit is contained in:
Doug Bunting 2019-03-18 12:24:53 -07:00
commit 1d1d664ea1
No known key found for this signature in database
GPG Key ID: 4F7A35FC67E693A9
3 changed files with 29 additions and 4 deletions

View File

@ -35,6 +35,7 @@ Later on, this will be checked using this condition:
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.4' "> <PropertyGroup Condition=" '$(VersionPrefix)' == '2.2.4' ">
<PackagesInPatch> <PackagesInPatch>
@aspnet/signalr;
</PackagesInPatch> </PackagesInPatch>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -1,26 +1,44 @@
// Copyright (c) .NET Foundation. All rights reserved. // 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. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Linq;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Net.Http.Headers; using System.Net.Http.Headers;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Testing;
using Xunit; using Xunit;
using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Mvc.FunctionalTests namespace Microsoft.AspNetCore.Mvc.FunctionalTests
{ {
/// <summary> /// <summary>
/// Functional test to verify the error reporting of Razor compilation by diagnostic middleware. /// Functional test to verify the error reporting of Razor compilation by diagnostic middleware.
/// </summary> /// </summary>
public class ErrorPageTests : IClassFixture<MvcTestFixture<ErrorPageMiddlewareWebSite.Startup>> public class ErrorPageTests : IClassFixture<MvcTestFixture<ErrorPageMiddlewareWebSite.Startup>>, IDisposable
{ {
private static readonly string PreserveCompilationContextMessage = HtmlEncoder.Default.Encode( private static readonly string PreserveCompilationContextMessage = HtmlEncoder.Default.Encode(
"One or more compilation references may be missing. " + "One or more compilation references may be missing. " +
"If you're seeing this in a published application, set 'CopyRefAssembliesToPublishDirectory' to true in your project file to ensure files in the refs directory are published."); "If you're seeing this in a published application, set 'CopyRefAssembliesToPublishDirectory' to true in your project file to ensure files in the refs directory are published.");
public ErrorPageTests(MvcTestFixture<ErrorPageMiddlewareWebSite.Startup> fixture) private readonly AssemblyTestLog _assemblyTestLog;
public ErrorPageTests(
MvcTestFixture<ErrorPageMiddlewareWebSite.Startup> fixture,
ITestOutputHelper testOutputHelper)
{ {
Client = fixture.CreateDefaultClient(); _assemblyTestLog = AssemblyTestLog.ForAssembly(GetType().Assembly);
var loggerProvider = _assemblyTestLog.CreateLoggerFactory(testOutputHelper, GetType().Name);
var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup<ErrorPageMiddlewareWebSite.Startup>());
Client = factory
.WithWebHostBuilder(builder => builder.ConfigureLogging(l => l.Services.AddSingleton<ILoggerFactory>(loggerProvider)))
.CreateDefaultClient();
} }
public HttpClient Client { get; } public HttpClient Client { get; }
@ -143,5 +161,10 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
Assert.Contains(nullReferenceException, content); Assert.Contains(nullReferenceException, content);
Assert.Contains(indexOutOfRangeException, content); Assert.Contains(indexOutOfRangeException, content);
} }
public void Dispose()
{
_assemblyTestLog.Dispose();
}
} }
} }

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MvcTestingTargets)" Condition="'$(MvcTestingTargets)' != ''" /> <Import Project="$(MvcTestingTargets)" Condition="'$(MvcTestingTargets)' != ''" />
<PropertyGroup> <PropertyGroup>
@ -6,6 +6,7 @@
<DefineConstants Condition="'$(GenerateBaselines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants> <DefineConstants Condition="'$(GenerateBaselines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants>
<DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES</DefineConstants> <DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES</DefineConstants>
<TestGroupName>Mvc.FunctionalTests</TestGroupName>
<!-- The test asset projects this depends on are not strong-named. --> <!-- The test asset projects this depends on are not strong-named. -->
<SignAssembly>false</SignAssembly> <SignAssembly>false</SignAssembly>
<!-- https://github.com/aspnet/AspNetCore/issues/6549 --> <!-- https://github.com/aspnet/AspNetCore/issues/6549 -->