-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add statsd request success function on handleGetAuthKeyIDs #929
Conversation
main_test.go
Outdated
if err != nil { | ||
t.Errorf("Error setting up request.") | ||
} | ||
ag.statsWriteSuccess(req, "test") |
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.
Ideally, the stats
object on ag
would be some sort of mock or other thing that we can inspect afterwards. Or at the very least, we need to ensure that it was called appropriately.
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.
Yeah, agreed with Ben's point about the null object.
We'll need a baseline attempts
here.
And this would possibly be nice as capturing the status codes returned. Sometimes these metric libraries provide that out of the box (perhaps in a more recent version than we have). Does it? Or do we need to write the Write/WriteHeader wrappers ourselves?
Finally, I don't see an explanation of this change but I'm assuming you only did one HTTP endpoint to see if this is what we wanted, yeah? Def want the rest.
I was not able to find a good way of mocking Updated the
Exactly. Wanted to keep the PR minimal for adding just the functionality, will add other methods later. |
@hneiva - We can forego any of the test mocking if you'd like, but can we get this part addressed? |
For my memory: there is a |
@hneiva - Is review still needed on this iteration? I think it was decided out of band that some changes would be made? |
No need for this anymore since the work Jeff and I did on other PRs |
No description provided.