-
Notifications
You must be signed in to change notification settings - Fork 2
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
Redact HTTP dumps #130
Redact HTTP dumps #130
Conversation
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestDumpTransport(t *testing.T) { |
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.
Function TestDumpTransport
has 86 lines of code (exceeds 70 allowed). Consider refactoring.
return false, rc, err | ||
} | ||
|
||
return rx.Match(content.Bytes()), io.NopCloser(&content), nil |
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.
Should we print [REDACTED]
here like we do for the Auth header? Right now it just prints nothing.
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.
Definitely can - just pushed this. I was using httputil.DumpX
's built-in body redaction, which is an empty body.
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.
Looks good, just needs a changelog entry
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestDumpTransport(t *testing.T) { |
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.
Function TestDumpTransport
has 88 lines of code (exceeds 70 allowed). Consider refactoring.
2581bae
to
a2d0720
Compare
a2d0720
to
0f0dda4
Compare
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
Code Climate has analyzed commit 0f0dda4 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 85.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 82.2% (0.7% change). View more on Code Climate. |
Desired Outcome
Please describe the desired outcome for this PR. Said another way, what was
the original request that resulted in these code changes? Feel free to copy
this information from the connected issue.
Implemented Changes
Describe how the desired outcome above has been achieved with this PR. In
particular, consider:
Connected Issue/Story
Resolves #[relevant GitHub issue(s), e.g. 76]
CyberArk internal issue ID: [insert issue ID]
Definition of Done
At least 1 todo must be completed in the sections below for the PR to be
merged.
Changelog
CHANGELOG update
Test coverage
changes, or
Documentation
README
s) were updated in this PRBehavior
Security