-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[#21384] Increase sql package test coverage from 35% to 70% #33711
Conversation
Assigning reviewers. If you would like to opt out of this review, comment R: @lostluck for label go. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
@lostluck Can you please review and merge it to the repo? |
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.
Thank you very much Mohit! This is wonderful. I do have some style and consistency comments however. It's a good rule of thumb to not introduce a wildly different style to a codebase within a given language, as it makes it harder to work in.
What you have here is good, but it can be better (though you might need to do a bit of reading first).
@lostluck, thank you for telling me. As I am learning Go, I will improve myself and make the changes you mentioned above. |
Hey @lostluck, could you take a look at the changes? |
Hey @lostluck, just following up on this. Could you take a look when you have a chance? Thanks! |
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.
Thank you for your patience. Last week became surprisingly busy, and I kept losing the tab where I had this open.
A few more comments, but your updates are steps in the right direction!
…d pipelines (@dev-mohit06) - Replaced with in and for better error reporting and readability. - Isolated pipeline, scope, and collection creation in to ensure independent test cases. - Consolidated checks in by constructing an options struct and comparing it with the actual struct using . - Added a custom comparer for to ensure accurate comparison of underlying types. - Removed specific entry from as it is unnecessary.
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.
Approved after the .gitignore change is removed.
This looks great now! Thank you for your patience and understanding through the review cycle. I hope you've learned a few things about Go testing here.
Removed the specific `coverage.out` entry from `.gitignore` as it is unnecessary for the project.
Hi @lostluck, Could you please accept my LinkedIn connection request? Here’s my profile for reference: https://www.linkedin.com/in/mohit-paddhariya/ Looking forward to connecting with you! Best regards, |
@lostluck, Could you let me know when my branch will be merged? |
As soon as the test suite passes. Thanks again! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #33711 +/- ##
=========================================
Coverage 57.47% 57.48%
Complexity 1474 1474
=========================================
Files 985 985
Lines 155895 155910 +15
Branches 1076 1076
=========================================
+ Hits 89598 89618 +20
Misses 64076 64076
+ Partials 2221 2216 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@lostluck - I really appreciate your mentorship and guidance throughout this project. Thank you for taking the time to help me grow professionally. I've learned a lot working with you. If you're comfortable, I would be grateful if you could endorse my skills on https://www.linkedin.com/in/mohit-paddhariya, as it would be valuable for my professional development. |
PR Summary:
This PR addresses #21384 by adding comprehensive unit tests to the
sql
package, increasing the code coverage from 35% to 75%. The following test cases have been added:Testing:
Checklist:
CHANGES.md
Additional Notes:
TestTransform
tests validate the required options without needing the expansion service.Screenshots:
Coverage Output:
Coverage.out File:
Test Cases Passing Locally: