feat(serilog): support restrictedToMinimumLevel when configuring Serilog in code #5181
1 issue
code-review: Found 1 issue (1 medium)
Medium
Filter test has no assertions verifying filtering behavior - `test/Sentry.Serilog.Tests/SentrySerilogSinkExtensionsTests.cs:129-143`
Sentry_WithRestrictedToMinimumLevel_FiltersLogsBelow logs a Warning and an Error but never asserts that the Warning was filtered out by Serilog or that the Error was delivered to the sink. With InitializeSdk = false and no spy/mock sink capturing log events, the test will pass even if restrictedToMinimumLevel is completely ignored. As a result, the new pass-through level functionality is not actually covered by a behavioral test, only by a does-not-throw smoke test.
Duration: 25.4s · Tokens: 237.2k in / 3.4k out · Cost: $2.51
Annotations
Check warning on line 143 in test/Sentry.Serilog.Tests/SentrySerilogSinkExtensionsTests.cs
sentry-warden / warden: code-review
Filter test has no assertions verifying filtering behavior
`Sentry_WithRestrictedToMinimumLevel_FiltersLogsBelow` logs a Warning and an Error but never asserts that the Warning was filtered out by Serilog or that the Error was delivered to the sink. With `InitializeSdk = false` and no spy/mock sink capturing log events, the test will pass even if `restrictedToMinimumLevel` is completely ignored. As a result, the new pass-through level functionality is not actually covered by a behavioral test, only by a does-not-throw smoke test.