-
Notifications
You must be signed in to change notification settings - Fork 106
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
Initial tests for uncompressed structs with ordered maps. #870
Conversation
When comparing two GoStructs where a YANG `ordered-by user` list is involved, it is not possible using a single Notification to represent the diff such that the Notification can do the following: 1. update a gNMI cache correctly with the atomic notification. 2. unmarshal the notification to the `orig` to get back the `modified` GoStruct. This function achieves this functionality, sharing the underlying implementation with Diff, where a disclaimer has been added to the doc comment. Other helpers have been created as well to be shared with `TogNMINotifications`. Other changes: - `TogNMINotifications` has been changed to follow the same convention of putting the non-atomic Notification as the first message instead of the last. The reason is that current code MAY be using `notifs[0]` and I don't want to break that, and this also seems slightly better from a usability perspective.
"github.com/openconfig/ygot/ygot" | ||
) | ||
|
||
func GetOrderedMap(t *testing.T) *Ctestschema_OrderedLists_OrderedList_OrderedMap { |
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.
godoc for funcs in this file
nit: GetSampleOrderedMap or something to indicate that this returns an ordered with populated values
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.
Done. I'll also move these to an internal package in a subsequent PR.
No description provided.