[SqlClient] Add skippable SQL sanitizer tests#3660
[SqlClient] Add skippable SQL sanitizer tests#3660martincostello merged 3 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3660 +/- ##
==========================================
- Coverage 71.70% 71.52% -0.18%
==========================================
Files 445 455 +10
Lines 17589 17640 +51
==========================================
+ Hits 12612 12617 +5
- Misses 4977 5023 +46 Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR enhances the SQL sanitizer test infrastructure by adding support for skippable test cases. It introduces two new test cases that document known limitations related to stored procedure handling and sensitive data sanitization.
Key Changes:
- Added
Xunit.SkippableFactpackage dependency to enable conditional test skipping - Extended the test case model with an optional
Skipproperty to specify skip reasons - Added two skipped test cases for stored procedure scenarios that require future fixes
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/OpenTelemetry.Contrib.Shared.Tests/SqlProcessorTests.cs |
Updated test method to use SkippableTheory and added skip logic based on test case configuration |
test/OpenTelemetry.Contrib.Shared.Tests/SqlProcessorTestCases.cs |
Extended TestCase class with nullable Skip property and updated deserialization to handle it |
test/OpenTelemetry.Contrib.Shared.Tests/SqlProcessorAdditionalTestCases.json |
Added two skipped test cases: one for stored procedures without parameters and one for stored procedures with sensitive data |
test/OpenTelemetry.Contrib.Shared.Tests/OpenTelemetry.Contrib.Shared.Tests.csproj |
Added Xunit.SkippableFact package reference |
Directory.Packages.props |
Specified version 1.5.61 for Xunit.SkippableFact package |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add support for skipping test cases for `SqlProcessor`.
Add two tests related to open-telemetry#3657.
4735516 to
64e8754
Compare
Add more test cases for query sanitization and summary.
Relates to #3657, #3659 and #3666.
Changes
SqlProcessor.Merge requirement checklist
AppropriateCHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)