Skip to content

Test projects cleanup#1762

Merged
SimonCropp merged 3 commits into
mainfrom
test-projects-cleanup
Jul 1, 2022
Merged

Test projects cleanup#1762
SimonCropp merged 3 commits into
mainfrom
test-projects-cleanup

Conversation

@mattjohnsonpint

@mattjohnsonpint mattjohnsonpint commented Jun 30, 2022

Copy link
Copy Markdown
Contributor
  • Refactored to remove ASP.NET Core dependencies from Sentry.Testing, which unblocks MAUI Android Device Tests #1703
  • Re-enables .NET Framework tests for ASP.NET Core 2.1. We were testing the OS using a deprecated technique, so these tests weren't actually running before - even on Windows. They are now, and restoring them also generated a missing API verification file.
  • Updates all the tests to use the latest minor release of their various dependencies.
    • Note, we need to come up with a better way to stay evergreen with test dependencies. While we want our libraries to use minimum compatible versions, the tests should use latest.

#skip-changelog


<!-- Running these tests on Mono fail -->
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">

@mattjohnsonpint mattjohnsonpint Jun 30, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's another case where we were checking incorrectly. If OS wasn't defined, then the tests didn't run for this target at all on any OS.


<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;net461</TargetFrameworks>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just include net461 directly now. The comment about the tests hanging on Mono appears to be not the case anymore. But note that it wasn't being included on Windows before because of the way we were checking.

Condition="'$(OS)' == 'Windows_NT'" is unsupported. The correct way is Condition="$([MSBuild]::IsOSPlatform('windows'))".

@SimonCropp SimonCropp merged commit 9feaab3 into main Jul 1, 2022
@SimonCropp SimonCropp deleted the test-projects-cleanup branch July 1, 2022 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants