Closed Jarema closed 1 month ago
think we need coverage of sending empty objects on the other endpoints that might have been relying on filtering out empty fields.
also for this one need a test of sending unitialized placement like {“placement”: null}
Will add a test. Did a brief check of others usages and it seems fine, but will test to be sure.
Added a test, but I wonder if it makes sense to have it - empty object test achieves the same as JSApiLeaderStepdownRequest{Placement: nil}
.
Checked other endpoints that are using new function. We do not have pointers in them.
@Jarema you're right in this case placement
has omitempty so result would be the same
The check for empty object exposed a lack of check for
*Placement
before accessing its fields. This commit properly fixes it.Signed-off-by: Tomasz Pietrek tomasz@nats.io