This issue causes problems with ValueTuple when used across assembly
boundaries between netstandard and net4X when net471 is installed. These
tests fail consistently in appveyor and will fail on any machine with
net471 installed.
This commit is contained in:
Ryan Nowak 2018-01-02 20:35:39 -08:00
parent 5778f44bf7
commit 64259fe51c
3 changed files with 29 additions and 13 deletions

View File

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
@ -31,7 +32,8 @@ namespace Microsoft.AspNetCore.Mvc
Assert.Equal("text/plain", result.ContentType.ToString());
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public async Task ContentDispositionHeader_IsEncodedCorrectly()
{
// See comment in FileResult.cs detailing how the FileDownloadName should be encoded.
@ -55,7 +57,8 @@ namespace Microsoft.AspNetCore.Mvc
Assert.Equal(@"attachment; filename=""some\\file""; filename*=UTF-8''some%5Cfile", httpContext.Response.Headers["Content-Disposition"]);
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public async Task ContentDispositionHeader_IsEncodedCorrectly_ForUnicodeCharacters()
{
// Arrange
@ -77,7 +80,8 @@ namespace Microsoft.AspNetCore.Mvc
httpContext.Response.Headers["Content-Disposition"]);
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public async Task ExecuteResultAsync_DoesNotSetContentDisposition_IfNotSpecified()
{
// Arrange
@ -102,7 +106,8 @@ namespace Microsoft.AspNetCore.Mvc
Assert.Equal(Stream.Null, httpContext.Response.Body);
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public async Task ExecuteResultAsync_SetsContentDisposition_IfSpecified()
{
// Arrange
@ -123,7 +128,8 @@ namespace Microsoft.AspNetCore.Mvc
Assert.Equal("attachment; filename=filename.ext; filename*=UTF-8''filename.ext", httpContext.Response.Headers["Content-Disposition"]);
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public async Task ExecuteResultAsync_ThrowsException_IfCannotResolveLoggerFactory()
{
// Arrange
@ -136,7 +142,8 @@ namespace Microsoft.AspNetCore.Mvc
await Assert.ThrowsAsync<InvalidOperationException>(() => result.ExecuteResultAsync(actionContext));
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public async Task ExecuteResultAsync_LogsInformation_IfCanResolveLoggerFactory()
{
// Arrange
@ -251,7 +258,8 @@ namespace Microsoft.AspNetCore.Mvc
Assert.Equal(expectedOutput, actual);
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public async Task SetsAcceptRangeHeader()
{
// Arrange

View File

@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Testing.xunit;
using Moq;
using Xunit;
@ -18,7 +19,8 @@ namespace Microsoft.AspNetCore.Mvc.Internal
{
public class ControllerActionInvokerCacheTest
{
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public void GetControllerActionMethodExecutor_CachesFilters()
{
// Arrange
@ -39,7 +41,8 @@ namespace Microsoft.AspNetCore.Mvc.Internal
Assert.Equal(cacheEntry1.filters, cacheEntry2.filters);
}
[Fact]
[ConditionalFact]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
public void GetControllerActionMethodExecutor_CachesEntry()
{
// Arrange

View File

@ -1,6 +1,7 @@
// 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 Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging.Abstractions;
using Xunit;
@ -8,7 +9,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
{
public class PageSelectorModelTest
{
[Theory]
[ConditionalTheory]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
[InlineData("/Areas/About.cshtml")]
[InlineData("/Areas/MyArea/Index.cshtml")]
public void TryParseAreaPath_ReturnsFalse_IfPathDoesNotConform(string path)
@ -23,7 +25,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
Assert.False(success);
}
[Theory]
[ConditionalTheory]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
[InlineData("/MyArea/Views/About.cshtml")]
[InlineData("/MyArea/SubDir/Pages/Index.cshtml")]
[InlineData("/MyArea/NotPages/SubDir/About.cshtml")]
@ -39,7 +42,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
Assert.False(success);
}
[Theory]
[ConditionalTheory]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
[InlineData("/MyArea/Pages/Index.cshtml", "MyArea", "/Index", "/MyArea/Index")]
[InlineData("/Accounts/Pages/Manage/Edit.cshtml", "Accounts", "/Manage/Edit", "/Accounts/Manage/Edit")]
public void TryParseAreaPath_ParsesAreaPath(
@ -61,7 +65,8 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
Assert.Equal(expectedRoute, result.pageRoute);
}
[Theory]
[ConditionalTheory]
[FrameworkSkipCondition(RuntimeFrameworks.CLR, SkipReason = "Fails due to dotnet/standard#567")]
[InlineData("/MyArea/Dir1/Dir2/Index.cshtml", "MyArea", "/Index", "/MyArea/Index")]
[InlineData("/Accounts/Dir1/Dir2/Manage/Edit.cshtml", "Accounts", "/Manage/Edit", "/Accounts/Manage/Edit")]
public void TryParseAreaPath_ParsesAreaPath_WithMultiLevelRootDirectory(