diff --git a/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs b/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs
index fc623bb5ba..0831cd2ac6 100644
--- a/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs
+++ b/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs
@@ -38,8 +38,7 @@ namespace Microsoft.AspNetCore.Identity.Test
}
}
- [ConditionalTheory]
- [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
+ [Theory]
[MemberData(nameof(ScriptWithIntegrityData))]
public async Task IdentityUI_ScriptTags_SubresourceIntegrityCheck(ScriptTag scriptTag)
{
@@ -68,8 +67,7 @@ namespace Microsoft.AspNetCore.Identity.Test
}
}
- [ConditionalTheory]
- [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
+ [Theory]
[MemberData(nameof(ScriptWithFallbackSrcData))]
public async Task IdentityUI_ScriptTags_FallbackSourceContent_Matches_CDNContent(ScriptTag scriptTag)
{
@@ -148,13 +146,17 @@ namespace Microsoft.AspNetCore.Identity.Test
private static string GetSolutionDir()
{
var dir = new DirectoryInfo(AppContext.BaseDirectory);
- while (dir != null)
+ // On helix we use the published copy
+ if (!SkipOnHelixAttribute.OnHelix())
{
- if (File.Exists(Path.Combine(dir.FullName, "Identity.sln")))
+ while (dir != null)
{
- break;
+ if (File.Exists(Path.Combine(dir.FullName, "Identity.sln")))
+ {
+ break;
+ }
+ dir = dir.Parent;
}
- dir = dir.Parent;
}
return dir.FullName;
}
diff --git a/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj b/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj
index e887fbe93e..b955cc49e5 100644
--- a/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj
+++ b/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj
@@ -7,6 +7,8 @@
+
+
diff --git a/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs b/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs
index 72366b83b0..89f141ef95 100644
--- a/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs
+++ b/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs
@@ -1,9 +1,11 @@
// 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;
using System.IO;
using Microsoft.AspNetCore.Analyzer.Testing;
using Microsoft.AspNetCore.Testing;
+using Microsoft.AspNetCore.Testing.xunit;
namespace Microsoft.AspNetCore.Mvc
{
@@ -25,6 +27,12 @@ namespace Microsoft.AspNetCore.Mvc
private static string GetProjectDirectory()
{
+ // On helix we use the published test files
+ if (SkipOnHelixAttribute.OnHelix())
+ {
+ return AppContext.BaseDirectory;
+ }
+
var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("Mvc");
var projectDirectory = Path.Combine(solutionDirectory, "Mvc.Analyzers", "test");
return projectDirectory;
diff --git a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj
index 396f76d882..7e76a2edd6 100644
--- a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj
+++ b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj
@@ -4,12 +4,14 @@
netcoreapp3.0
true
Microsoft.AspNetCore.Mvc.Analyzers
-
+
false
-
+
+
+
diff --git a/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs b/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs
index cb0ca8025e..fb20bd8cbf 100644
--- a/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs
+++ b/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs
@@ -1,9 +1,11 @@
// 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;
using System.IO;
using Microsoft.AspNetCore.Analyzer.Testing;
using Microsoft.AspNetCore.Testing;
+using Microsoft.AspNetCore.Testing.xunit;
namespace Microsoft.AspNetCore.Mvc
{
@@ -25,6 +27,12 @@ namespace Microsoft.AspNetCore.Mvc
private static string GetProjectDirectory()
{
+ // On helix we use the published test files
+ if (SkipOnHelixAttribute.OnHelix())
+ {
+ return AppContext.BaseDirectory;
+ }
+
var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("Mvc");
var projectDirectory = Path.Combine(solutionDirectory, "Mvc.Api.Analyzers", "test");
return projectDirectory;
diff --git a/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj b/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj
index 104b0e79a6..b562b365e3 100644
--- a/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj
+++ b/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj
@@ -3,12 +3,14 @@
netcoreapp3.0
Microsoft.AspNetCore.Mvc.Api.Analyzers
-
+
false
-
+
+
+
diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs
index a427f7c480..2011a0b6f1 100644
--- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs
+++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs
@@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack;
+using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
using Xunit;
@@ -1015,7 +1016,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
Assert.IsType(thrownEx.InnerException);
}
- [Fact]
+ [ConditionalFact]
+ [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7000
public async Task ContentLength_Received_ReadViaPipes()
{
await InitializeConnectionAsync(async context =>
diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs
index 5168fcf6f6..5a6f143625 100644
--- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs
+++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs
@@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
using Microsoft.AspNetCore.Testing;
+using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Net.Http.Headers;
using Moq;
using Xunit;
@@ -262,7 +263,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
await sendTask.DefaultTimeout();
}
- [Fact]
+ [ConditionalFact]
+ [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7000
public async Task DATA_Sent_TooSlowlyDueToSocketBackPressureOnSmallWrite_AbortsConnectionAfterGracePeriod()
{
var mockSystemClock = _serviceContext.MockSystemClock;
diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs
index 03c276c676..a0214a49d0 100644
--- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs
+++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs
@@ -30,6 +30,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.Http2
private static X509Certificate2 _x509Certificate2 = TestResources.GetTestCertificate();
[ConditionalFact]
+ [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7000
public async Task TlsHandshakeRejectsTlsLessThan12()
{
using (var server = new TestServer(context =>
diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj b/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj
index 606b25bc67..c7b344c2c8 100644
--- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj
+++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj
@@ -4,13 +4,12 @@
netcoreapp3.0
true
InMemory.FunctionalTests
-
- false
-
+
+
diff --git a/src/Shared/test/SkipOnHelixAttribute.cs b/src/Shared/test/SkipOnHelixAttribute.cs
index c84b8e9097..f33f1a64d9 100644
--- a/src/Shared/test/SkipOnHelixAttribute.cs
+++ b/src/Shared/test/SkipOnHelixAttribute.cs
@@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Testing.xunit
{
get
{
- return !string.Equals(Environment.GetEnvironmentVariable("helix"), "true", StringComparison.OrdinalIgnoreCase);
+ return !OnHelix();
}
}
@@ -27,5 +27,7 @@ namespace Microsoft.AspNetCore.Testing.xunit
return $"This test is skipped on helix";
}
}
+
+ public static bool OnHelix() => string.Equals(Environment.GetEnvironmentVariable("helix"), "true", StringComparison.OrdinalIgnoreCase);
}
}