-
Bug
-
Resolution: Not a Bug
-
Medium
-
Istanbul Release
-
None
CPS core stores tree data in the fragment table and the information about the parent and root is important.
Each dataspace and anchor combination should have only one root. It means that the fragment table can't have more than one entry with parent_id as null for a combination of dataspace and anchor.
Currently, cps-ri test data does not meet this condition.
A snippet from https://gerrit.onap.org/r/gitweb?p=cps.git;a=blob;f=cps-ri/src/test/resources/data/fragment.sql;h=1897185fa073a7ed4011b19f4ecea0a28d236ceb;hb=refs/heads/master file
INSERT INTO FRAGMENT (ID, DATASPACE_ID, ANCHOR_ID, PARENT_ID, XPATH) VALUES (4001, 1001, 3001, null, '/parent-1'), (4002, 1001, 3001, null, '/parent-2'), (4003, 1001, 3001, null, '/parent-3'), (4004, 1001, 3001, 4001, '/parent-1/child-1'), (4005, 1001, 3001, 4002, '/parent-2/child-2'), (4006, 1001, 3001, 4004, '/parent-1/child-1/grandchild-1');
AC:
All the existing test cases should pass after the data has been corrected.
- blocks
-
CPS-479 Get Nodes API does not always return the object from the root
- Closed