-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: support classic ingest keys #96
Conversation
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.
Testing this change the same way the isClassic check was being tested before makes sense if we're keeping it a private method! I could still be convinced to make it a public method, but this seems perfectly fine to me
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.
The new function looks good. I've added a commit to make the IsClassic
function internal and then exposed it to the test project using the InternalsVisbleTo
directive. This means the function isn't public for consumers to see / use and can be tested.
If you could add some tests IsClassic
like we have for the other libhoney's, that would be great.
0f18191
to
ee91934
Compare
ee91934
to
b0d6415
Compare
Thanks for your help, Mike! Just pushed up some direct tests for |
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 👍🏻
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 👍🏻
PS I noticed one more small suggestion for checking the write key is not null / empty.
Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Which problem is this PR solving?
Short description of the changes
IsClassic
lambda expression to a function with the new Regex logic** Note: For most other libhoneys we have made this IsClassic function public. However, since .NET does not have a beeline, it seemed like it would be best to leave this as a private method. Since it is private, it also becomes harder to write a unit test for, which is why I am testing it through
DefaultDataset
. Let me know if there's a preferred approach to testing private methods through reflection or something like that.