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

View File

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

View File

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