-
Notifications
You must be signed in to change notification settings - Fork 206
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
Fix SanitizeFieldNamesTests #1299
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,7 +320,7 @@ public async Task SanitizeHeadersOnError(string headerName, bool useOnlyDiagnost | |
_capturedPayload.FirstTransaction.Context.Request.Headers[headerName].Should().Be("[REDACTED]"); | ||
|
||
_capturedPayload.WaitForErrors(); | ||
_capturedPayload.Errors.Should().ContainSingle(); | ||
_capturedPayload.Errors.Should().NotBeEmpty(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is capturing more than one error now expected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I debugged it and I saw a failing outgoing HTTP request into some resource which looked like part of the sample app. Below we specifically assert that the first error must contain the header and the value must be |
||
_capturedPayload.FirstError.Context.Should().NotBeNull(); | ||
_capturedPayload.FirstError.Context.Request.Should().NotBeNull(); | ||
_capturedPayload.FirstError.Context.Request.Headers.Should().NotBeNull(); | ||
|
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.
We need
.ToList()
here, otherwise we can't change the dictionary within theforeach
. Same inHeaderDictionarySanitizerFilter.cs