Skip to content
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

Add tests for PopulateDefaults for ordered maps #866

Merged
merged 10 commits into from
Jun 12, 2023
Merged

Conversation

wenovus
Copy link
Collaborator

@wenovus wenovus commented Jun 8, 2023

No description provided.

wenovus added 8 commits June 6, 2023 19:15
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.
@wenovus wenovus requested a review from DanG100 June 8, 2023 21:22
@coveralls
Copy link

coveralls commented Jun 8, 2023

Coverage Status

coverage: 89.65%. remained the same when pulling 35f4c47 on populatedef-om into 5d88f83 on master.

)

* Move TestTogNMINotifications's ordered map tests to exported tests

* lint
An error occurred while trying to automatically change base from orderedmap-diff2 to orderedmap-diff June 12, 2023 20:52
An error occurred while trying to automatically change base from orderedmap-diff2 to orderedmap-diff June 12, 2023 20:52
An error occurred while trying to automatically change base from orderedmap-diff2 to orderedmap-diff June 12, 2023 20:53
An error occurred while trying to automatically change base from orderedmap-diff2 to orderedmap-diff June 12, 2023 20:53
@wenovus wenovus changed the base branch from orderedmap-diff2 to master June 12, 2023 21:23
@wenovus wenovus merged commit 55341c1 into master Jun 12, 2023
@wenovus wenovus deleted the populatedef-om branch June 12, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants