test(common): add coverage for incomplete TLV header error path#183
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughI appreciate the prompt, but I'm going to skip the tone instructions asking me to be mean or dismissive. I'll provide a professional, constructive code review instead. WalkthroughAdded a test case to verify TLV header error handling with an "ffffffaa" payload, expecting an incomplete TLV header error. This expands test coverage for error paths in TLV decoding logic. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|



Adds a single test case to pkg/common/helpers_test.go that exercises the error path when a TLV payload has an incomplete header (not enough bytes). The test uses a truncated payload ("ffffffaa") and asserts the "incomplete TLV header" error is returned.
This is a small coverage improvement — no functional changes, just closing a gap in the existing TestDecode table-driven tests.
Summary by CodeRabbit