Skip to content

Reenable some helix tests #7763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 55 commits into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d16fa7a
Fix identity UI script tests on helix
HaoK Feb 20, 2019
1871446
Fix MVC analyzer tests on mvc
HaoK Feb 21, 2019
7b5bc23
Fix api analyzers
HaoK Feb 21, 2019
b8d7fb0
Reenable helix payloads
HaoK Feb 21, 2019
68fe9d8
Skip failing logged tests
HaoK Feb 22, 2019
b334774
Update RequestTests.cs
HaoK Feb 22, 2019
60d3b85
Update ResponseTests.cs
HaoK Feb 22, 2019
8fb241e
Update MaxRequestBufferSizeTests.cs
HaoK Feb 22, 2019
190fc40
Update ConnectionAdapterTests.cs
HaoK Feb 22, 2019
ff6c893
Update ShutdownTests.cs
HaoK Feb 22, 2019
5805c67
Update HandshakeTests.cs
HaoK Feb 22, 2019
1b8575d
Update StaticFileMiddlewareTests.cs
HaoK Feb 22, 2019
91722ca
Update WebSocketMiddlewareTests.cs
HaoK Feb 22, 2019
92ab9e1
Update MvcTestSource.cs
HaoK Feb 22, 2019
9831ea6
Update Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj
HaoK Feb 22, 2019
2183528
Update Microsoft.AspNetCore.WebSockets.Tests.csproj
HaoK Feb 22, 2019
c496c0c
Update Libuv.FunctionalTests.csproj
HaoK Feb 22, 2019
603c1ef
Update Sockets.FunctionalTests.csproj
HaoK Feb 22, 2019
b8b1d22
Update ConnectionAdapterTests.cs
HaoK Feb 22, 2019
fa1a81f
Update TlsTests.cs
HaoK Feb 22, 2019
ebc791b
Update AddressRegistrationTests.cs
HaoK Feb 22, 2019
2593d4b
Update InMemory.FunctionalTests.csproj
HaoK Feb 22, 2019
418a0b2
Update StaticFileMiddlewareTests.cs
HaoK Feb 22, 2019
e30f533
Update Http2TimeoutTests.cs
HaoK Feb 22, 2019
b76bb29
Update Sockets.BindTests.csproj
HaoK Feb 22, 2019
ba2b229
Update Libuv.BindTests.csproj
HaoK Feb 22, 2019
d2ec552
Update Libuv.FunctionalTests.csproj
HaoK Feb 22, 2019
a20c517
Update Sockets.FunctionalTests.csproj
HaoK Feb 22, 2019
434ea6b
Update Microsoft.AspNetCore.WebSockets.Tests.csproj
HaoK Feb 22, 2019
d2bcb97
Update Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj
HaoK Feb 22, 2019
e0d3a9a
Update Mvc.Analyzers.Test.csproj
HaoK Feb 22, 2019
283b1a1
Update Mvc.Api.Analyzers.Test.csproj
HaoK Feb 22, 2019
7d18aad
Update InMemory.FunctionalTests.csproj
HaoK Feb 22, 2019
20ed646
Disable logging testing for helix jobs
HaoK Feb 22, 2019
1ad84b1
Update Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj
HaoK Feb 22, 2019
202aee3
Update StaticFileMiddlewareTests.cs
HaoK Feb 22, 2019
1df8070
Update Microsoft.AspNetCore.WebSockets.Tests.csproj
HaoK Feb 22, 2019
ae90482
Update WebSocketMiddlewareTests.cs
HaoK Feb 22, 2019
ed1d8dc
Update AddressRegistrationTests.cs
HaoK Feb 22, 2019
1eeff2f
Update ConnectionAdapterTests.cs
HaoK Feb 22, 2019
c3e6db6
Update Libuv.BindTests.csproj
HaoK Feb 22, 2019
e6a7d92
Update Sockets.FunctionalTests.csproj
HaoK Feb 22, 2019
f153326
Update Sockets.BindTests.csproj
HaoK Feb 22, 2019
75d795f
Update Libuv.FunctionalTests.csproj
HaoK Feb 22, 2019
3226bb6
Update ResponseTests.cs
HaoK Feb 22, 2019
a5b53c7
Update RequestTests.cs
HaoK Feb 22, 2019
515cb5c
Update MaxRequestBufferSizeTests.cs
HaoK Feb 22, 2019
c897f89
Update ShutdownTests.cs
HaoK Feb 22, 2019
ddef1f8
Update HandshakeTests.cs
HaoK Feb 22, 2019
6919962
Update Directory.Build.targets
HaoK Feb 25, 2019
ffcde2c
Update InMemory.FunctionalTests.csproj
HaoK Feb 25, 2019
5d81aa1
Update Microsoft.AspNetCore.Identity.Test.csproj
HaoK Feb 25, 2019
795430b
Update Http2StreamTests.cs
HaoK Feb 25, 2019
344a5e9
Helix stuff
HaoK Feb 25, 2019
e58583d
Add OnHelix static helper method
HaoK Feb 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public static IEnumerable<object[]> ScriptWithIntegrityData
}
}

[ConditionalTheory]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[Theory]
[MemberData(nameof(ScriptWithIntegrityData))]
public async Task IdentityUI_ScriptTags_SubresourceIntegrityCheck(ScriptTag scriptTag)
{
Expand Down Expand Up @@ -68,8 +67,7 @@ public static IEnumerable<object[]> ScriptWithFallbackSrcData
}
}

[ConditionalTheory]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
[Theory]
[MemberData(nameof(ScriptWithFallbackSrcData))]
public async Task IdentityUI_ScriptTags_FallbackSourceContent_Matches_CDNContent(ScriptTag scriptTag)
{
Expand Down Expand Up @@ -148,13 +146,17 @@ private static List<ScriptTag> GetScriptTags(string cshtmlFile)
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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<ItemGroup>
<Compile Include="$(IdentityTestSharedSourceRoot)**\*.cs" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<HelixContent Include="..\..\UI\src\Areas\Identity\Pages\**\*.*" LinkBase="UI\src\Areas\Identity\Pages" />
<HelixContent Include="..\..\UI\src\wwwroot\**\*.*" LinkBase="UI\src\wwwroot" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -25,6 +27,12 @@ public static TestSource Read(string testClassName, string testMethod)

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;
Expand Down
6 changes: 4 additions & 2 deletions src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
<TargetFramework>netcoreapp3.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RootNamespace>Microsoft.AspNetCore.Mvc.Analyzers</RootNamespace>
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>
</PropertyGroup>

<ItemGroup>
<None Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="TestFiles\**\*.*" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -25,6 +27,12 @@ public static TestSource Read(string testClassName, string testMethod)

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;
Expand Down
6 changes: 4 additions & 2 deletions src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>Microsoft.AspNetCore.Mvc.Api.Analyzers</RootNamespace>
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\Mvc.Analyzers\test\Infrastructure\MvcDiagnosticAnalyzerRunner.cs" Link="Infrastructure\MvcDiagnosticAnalyzerRunner.cs" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="TestFiles\**\*.*" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
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;
Expand Down Expand Up @@ -1015,7 +1016,8 @@ await InitializeConnectionAsync(async context =>
Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException);
}

[Fact]
[ConditionalFact]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7000
public async Task ContentLength_Received_ReadViaPipes()
{
await InitializeConnectionAsync(async context =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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;
Expand Down Expand Up @@ -262,7 +263,8 @@ await WaitForConnectionErrorAsync<Http2ConnectionErrorException>(
await sendTask.DefaultTimeout();
}

[Fact]
[ConditionalFact]
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7000
public async Task DATA_Sent_TooSlowlyDueToSocketBackPressureOnSmallWrite_AbortsConnectionAfterGracePeriod()
{
var mockSystemClock = _serviceContext.MockSystemClock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class TlsTests : LoggedTest
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 =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
<TargetFramework>netcoreapp3.0</TargetFramework>
<ServerGarbageCollection>true</ServerGarbageCollection>
<TestGroupName>InMemory.FunctionalTests</TestGroupName>
<!-- // https://github.com/aspnet/AspNetCore/issues/7000 -->
<BuildHelixPayload>false</BuildHelixPayload>
</PropertyGroup>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedSourceRoot)NullScope.cs" />
<Compile Include="$(KestrelSharedSourceRoot)test\*.cs" LinkBase="shared" />
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

Expand Down
4 changes: 3 additions & 1 deletion src/Shared/test/SkipOnHelixAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public bool IsMet
{
get
{
return !string.Equals(Environment.GetEnvironmentVariable("helix"), "true", StringComparison.OrdinalIgnoreCase);
return !OnHelix();
}
}

Expand All @@ -27,5 +27,7 @@ public string SkipReason
return $"This test is skipped on helix";
}
}

public static bool OnHelix() => string.Equals(Environment.GetEnvironmentVariable("helix"), "true", StringComparison.OrdinalIgnoreCase);
}
}