[NETCONF-1163] Create tests for POST "insert" query parameter Created: 21/Sep/23  Updated: 22/Nov/23  Resolved: 22/Nov/23

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: 7.0.0
Fix Version/s: 7.0.0

Type: Bug Priority: Medium
Reporter: Peter Suna Assignee: Yaroslav Lastivka
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to NETCONF-1178 POST request with insert parameter fa... In Progress
relates to NETCONF-1177 PUT requests failing with "insert" qu... Confirmed
relates to NETCONF-1180 PUT request with insert=after cannot ... Confirmed

 Description   

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:

  1. Model requests in Postman/other API tool first.
  2. Create bugs for request which are not working.
  3. Create 8 unit tests.
  4. Add unit test which covers usage of LAST parameter (the default) and results in "data-already-exists" error.
  5. 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.


 Comments   
Comment by Yaroslav Lastivka [ 08/Nov/23 ]

Created bugs for failing requests:
https://jira.opendaylight.org/browse/NETCONF-1177
https://jira.opendaylight.org/browse/NETCONF-1178
https://jira.opendaylight.org/browse/NETCONF-1180

Generated at Wed Feb 07 20:16:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.