-
Notifications
You must be signed in to change notification settings - Fork 58
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
test(hesai): dependency-injectable TCP socket, HW interface testability #234
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #234 +/- ##
==========================================
- Coverage 27.21% 5.02% -22.20%
==========================================
Files 104 97 -7
Lines 9458 8321 -1137
Branches 2322 1578 -744
==========================================
- Hits 2574 418 -2156
- Misses 6449 7832 +1383
+ Partials 435 71 -364
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…und transport_drivers TCP Signed-off-by: Max SCHMELLER <[email protected]>
d2db773
to
b4eb3b5
Compare
Signed-off-by: Max SCHMELLER <[email protected]>
Signed-off-by: Max SCHMELLER <[email protected]>
b4eb3b5
to
ee5013f
Compare
PR Type
Related Links
Description
Previously, testing Nebula's HW interfaces has been difficult because all hardware drivers were hard-coded. This meant that during test time, a real network connection would have to be used, or, that
LD_PRELOAD
or macro trickery had to be used.This PR adds a dependency-injectable TCP socket implementation (currently just a wrapper around
transport_drivers
), which allows mocking the TCP socket at test time.Since the TCP socket is still very Hesai-specific, I have added the new socket and refactored it into
nebula_ros
andnebula_hw_interfaces_hesai
already.Basic unit tests to prove testability have been added. More will be added in a future PR.
Review Procedure
Remarks
Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks