-
Notifications
You must be signed in to change notification settings - Fork 356
[Infra] Add EnabledOnDockerPlatformFact #3028
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
[Infra] Add EnabledOnDockerPlatformFact #3028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors Docker platform detection logic by extracting common functionality into reusable helper classes and creating a new [EnabledOnDockerPlatformFact] attribute alongside the existing [EnabledOnDockerPlatformTheory] attribute.
- Extract Docker detection logic into a shared
DockerHelperclass - Create new
EnabledOnDockerPlatformFactAttributefor single test scenarios - Move
DockerPlatformenum to a separate file for better organization
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Shared/EnabledOnDockerPlatformTheoryAttribute.cs | Refactored to use the new DockerHelper instead of inline Docker detection logic |
| test/Shared/EnabledOnDockerPlatformFactAttribute.cs | New attribute for Fact tests that need Docker platform validation |
| test/Shared/DockerPlatform.cs | Extracted enum to separate file for better code organization |
| test/Shared/DockerHelper.cs | New helper class containing the Docker platform detection logic |
| test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientIntegrationTests.cs | Updated attribute reference and simplified assertion |
| test/OpenTelemetry.Instrumentation.SqlClient.Tests/OpenTelemetry.Instrumentation.SqlClient.Tests.csproj | Added references to new shared files |
| test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests.csproj | Added references to new shared files |
| test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkIntegrationTests.cs | Updated attribute reference |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3028 +/- ##
==========================================
- Coverage 69.61% 69.60% -0.02%
==========================================
Files 413 413
Lines 16203 16207 +4
==========================================
+ Hits 11280 11281 +1
- Misses 4923 4926 +3 Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Split out the implementation in `[EnabledOnDockerPlatformTheory]` to allow for a `[EnabledOnDockerPlatformFact]`.
4b4eb71 to
4902e78
Compare
rajkumar-rangaraj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
👍 |
Changes
Split out the implementation in
[EnabledOnDockerPlatformTheory]to allow for a[EnabledOnDockerPlatformFact].Cherry-picked from #3015.
Merge requirement checklist
AppropriateCHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)