Repository navigation
Conversation
ClusterNodeStatus is read from cluster node data and had no tests. The easy case to break is Unknown (5): it is a valid constant, but TryFrom rejects it as a wire value. Cover TryFrom, the binary round trip, rejected input to UnmarshalBinary, and String. Closes apache#5036
|
Thanks @Kidkender, and welcome. The description says Claude Code wrote the tests, so please run the team-review skill, as CONTRIBUTING.md asks, and post the result here. |
|
Thanks @justinmclean, sorry I missed that step. I ran team-review on e1045ef and all four roles came back APPROVE with no findings on the diff. It did point out a few things in the existing
Happy to open a separate issue for the team-review report |
|
Thanks for the PR. It is labeled If AI assistance was used to create this PR, you are required to run the Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5082 +/- ##
=========================================
Coverage 92.15% 92.15%
Complexity 4357 4357
=========================================
Files 1574 1574
Lines 417671 417671
Branches 346184 346184
=========================================
+ Hits 384895 384919 +24
+ Misses 27295 27275 -20
+ Partials 5481 5477 -4
🚀 New features to boost your workflow:
|
spetz
left a comment
There was a problem hiding this comment.
The tests cover wire decoding, round trips, invalid input, receiver preservation, and status names.
|
@Kidkender yes please, open the issue for the String receiver. |
Which issue does this PR address?
Closes #5036
Rationale
ClusterNodeStatusis decoded from cluster metadata responses, and nothing tested it. The detail most likely to break quietly is thatUnknown(5) is a valid constant butTryFromrejects it on the wire.What changed?
Adds
foreign/go/contracts/node_status_test.go. It has table tests forTryFromover bytes 0 to 5 and 255, aMarshalBinary/UnmarshalBinaryround trip for each valid status, a check thatUnmarshalBinaryrejects an empty slice and byte 5 and leaves the value unchanged, and theStringoutput for every status, includingunknown. No production code changes.Local Execution
go test ./contracts/...andgo vet ./contracts/inforeign/goprek runpassesDocs
AI Usage
node_status.goand rango test,go vetandprek runlocally.