Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-1163

Create tests for POST "insert" query parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 7.0.0
    • 7.0.0
    • restconf-nb

      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.

            yaroslav.lastivka Yaroslav Lastivka
            PeterSuna Peter Suna
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: