Skip to content

Commit

Permalink
Misc cleanup of ASP.NET Core test dependencies (#2098)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint authored Dec 22, 2022
1 parent 6f4fb3e commit be1a318
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 32 deletions.
1 change: 1 addition & 0 deletions Sentry-CI-Build-Linux.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj",
"test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj",
"test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj",
"test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj",
"test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj",
"test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj",
"test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj",
Expand Down
1 change: 1 addition & 0 deletions Sentry-CI-Build-Windows.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj",
"test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj",
"test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj",
"test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj",
"test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj",
"test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj",
"test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj",
Expand Down
1 change: 1 addition & 0 deletions Sentry-CI-Build-macOS.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj",
"test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj",
"test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj",
"test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj",
"test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj",
"test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj",
"test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj",
Expand Down
1 change: 1 addition & 0 deletions Sentry-CI-Test.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj",
"test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj",
"test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj",
"test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj",
"test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj",
"test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj",
"test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj",
Expand Down
1 change: 1 addition & 0 deletions SentryNoSamples.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj",
"test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj",
"test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj",
"test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj",
"test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj",
"test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj",
"test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,28 @@
<ProjectReference Include="..\Sentry.Testing\Sentry.Testing.csproj" />
</ItemGroup>

<!--
ASP.NET Core on .NET Framework is supported by Microsoft indefinitely on version 2.1 only.
Indeed, version 2.1 has newer nuget packages than version 2.2 (which is out of support).
Thus, we will test on 2.1.*, not 2.*.
See https://dotnet.microsoft.com/platform/support/policy/aspnet
And https://github.com/dotnet/aspnetcore/issues/3753#issuecomment-438046364
Also, JetBrains Rider (via Checkmarx) may report the following security vulnerabilities:
CVE-2019-0815
CVE-2020-1045
CVE-2020-1597
These are safe to ignore for our tests. A real project would resolve them by installing
an updated version of the ASP.NET Core runtime on their hosting server.
See https://github.com/dotnet/aspnetcore/issues/15423
-->
<ItemGroup Condition="$(TargetFramework) == 'net48'">
<PackageReference Include="Microsoft.AspNetCore" Version="2.*" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.*" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.*" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.*" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.1.*" />

<!-- this is needed because the version that is brought in transitively has a vulnerability warning -->
<PackageReference Include="Microsoft.AspNetCore.Server.IIS" Version="2.*" />
<!-- This is needed because the version that is brought in transitively also has a vulnerability warning -->
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.1.*" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'netcoreapp3.1'">
Expand Down
27 changes: 0 additions & 27 deletions test/Sentry.AspNetCore.Tests/Sentry.AspNetCore.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,6 @@
<ProjectReference Include="..\Sentry.Testing\Sentry.Testing.csproj" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'net48'">
<PackageReference Include="Microsoft.AspNetCore" Version="2.*" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.*" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.*" />

<!-- this is needed because the version that is brought in transitively has a vulnerability warning -->
<PackageReference Include="Microsoft.AspNetCore.Server.IIS" Version="2.*" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.*" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.*" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.*" />
<PackageReference Include="Verify.AspNetCore" Version="2.*" />
<PackageReference Include="Verify.Http" Version="4.*" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.*" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.*" />
<PackageReference Include="Verify.AspNetCore" Version="3.*" />
<PackageReference Include="Verify.Http" Version="4.*" />
</ItemGroup>

<ItemGroup>
<None Update="*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down

0 comments on commit be1a318

Please sign in to comment.