-
Bug
-
Resolution: Done
-
Medium
-
7.0.0
Create unit tests into RestconfDataServiceImplTest to cover insert query parameter (used together with point) for POST and PUT requests.
Create tests for all values of insert parameter: first, last, before, after.
You can use jukebox module as is already done in test class.
Examples of the request: https://datatracker.ietf.org/doc/html/rfc8040#appendix-B.3.4 and https://datatracker.ietf.org/doc/html/rfc8040#appendix-B.3.5.
Expectations:
- Model requests in Postman/other API tool first.
- Create bugs for request which are not working.
- Create 8 unit tests.
- Add unit test which covers usage of LAST parameter (the default) and results in "data-already-exists" error.
- Finally https://github.com/opendaylight/netconf/blob/4e6d5b5fb8c2aa9d428a9361d54f5113fb4f9a59/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/transactions/RestconfStrategy.java#L357-L360C41 will be covered.
- relates to
-
NETCONF-1178 POST request with insert parameter fails if target URI points the list
- Resolved
-
NETCONF-1180 PUT request with insert=after cannot add last item into list
- Resolved
-
NETCONF-1177 PUT requests failing with "insert" query parameter on testool models
- Confirmed