aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test
AgeCommit message (Collapse)AuthorFilesLines
2021-04-26Get Data under anchor using single rootRishi.Chail2-12/+22
Issue-ID: CPS-325 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: Id8da3d767199c5767c625b55d175ac6791dcca48
2021-04-23Upgrade to PostgreSQL 13Rishi.Chail1-1/+1
Upgrade version in docker compose and test containers to match OOM version. Issue-ID: CPS-355 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: I8da816fb932822e50380e7c12487e234d75fa4d7
2021-04-22Implement ends with cps path query to support multiple attributes with 'and' ↵puthuparambil.aditya4-78/+209
condition Issue-ID: CPS-309 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I80bf2650e2cd979b806fc29302fc5cb295f65241 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
2021-04-22Document legacy CPS Path functionalityToineSiebelink1-3/+4
Issue-ID: CPS-334 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ib5266c7b30097661d97f8a499eaddc738dda0539
2021-04-15Fix "ends-with" query syntax to conform with xPath definitionToineSiebelink2-25/+27
"ends-with" is HOW we resolve it in sql query. 'descendant anywhere' is the correct Path name for the '//' operator - Updated method names, variable names, test description to reflect the correct terminolgy - Udpated query to always perfix the target (descendant name) with an '\' so it alwasy only matches whole node names - Updated regex for cpsPath to NOT accept triple /// (as per xPath this is invalid since a ndoeName cannot start with or contain a node separator Issue-ID: CPS-336 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I9f181d6986d038311b839e3f9c5afc4237c7d347
2021-04-07Delete anchor part 1: service and persistence layersRuslan Kashapov2-8/+36
Issue-ID: CPS-312 Change-Id: I10ab5a2d115ffdf8179a99b6ec712f3eccfb5f13 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-03-31Fix to store data for 2 anchors using same modelBruno Sakoto2-0/+19
This change deletes the database index on fragment table for dataspace and xpath. Issue-ID: CPS-300 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I586cc38f7ed00a16f751ed4dbe3b514226c62657
2021-03-24Internal Server Error when creating the same data node twiceniamhcore3-7/+10
This change adds a generic exception handler class for a already defined object and handles a JsonSyntaxException. Issue-ID: CPS-290 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ie645237b5dd5b8e2b1d074c5613e7da560f57484
2021-03-11Fix for security hotspot related to wek cyptographyputhuparambil.aditya2-6/+6
https://sonarcloud.io/project/security_hotspots?id=onap_cps&hotspots=AXfObcurA2pnU4Plp4-j Issue-ID: CPS-286 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I31012f81797396682dbccae0e4992a33bac806c7
2021-03-10Fix SOnarQube bug on RegexToineSiebelink1-9/+11
- Regex included unlimitted repetition is now limited to 99 99 nested yang container should sufice, in my experience in 5G 20-30 levels is the max I have seen we can always record it as a 'known limitation' -tried to improve the redability of the Regex using constant names - Added edge-case senarios testing related to query regex Issue-ID: CPS-89 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ic3442bc8ca22fe66976948f9913e033245a0e41c
2021-03-04CPS-265 - Update cps path query to support 'ends with'niamhcore2-21/+67
Issue-ID: CPS-265 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I604191feaad820983d86e6fd844f543f51096a4e
2021-03-02CPS-265 - updating cps path to support include-descendants option.niamhcore2-9/+11
Issue-ID: CPS-265 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I9e9b84760dbc8b5eb4b31ab972fdb2d186c6bb48
2021-02-24Schema creation and Data pre-load to on cps-xnf-proxy start-up using liquibaseputhuparambil.aditya1-0/+4
1. Common change-log master used only to specify the different change sets. 2. Specific change set created for cpsTables creation and for loading data to each cps component like dataspace, schema-set, anchor and dataNode 3. The data load cabability is configurable in the sense, it will be trigered only if the label is specified in the application.yaml Issue-ID: CPS-173, CPS-242 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I44c640ce50b7203f5799d722149397478a98bc05
2021-02-19Persistence layer - Query Datanodes using cpsPath that contains contains a ↵niamhcore3-5/+94
leaf name and a leaf value Issue-ID: CPS-231 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I9bd483a4b76e233ab6c64b3ef8aacb593e4e9da0
2021-02-16Data fragment update by xpath #2 - persistence layerRuslan Kashapov2-12/+118
Issue-ID: CPS-58 Change-Id: Ifc4580936d06c6907d6b5ab20657063b6707ccbe Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-02-04Fetching data node by xpath - persistence layerRuslan Kashapov3-37/+104
IssueID: CPS-71 Change-Id: I88f76cf36ef8a1e4ccbd4f1eac8867e93ed5be82 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-29Introducing Spock/Groovy for Data Integration TestsToineSiebelink7-633/+522
Replaced CpsAdminPersistenceServiceTest with CpsAdminPersistenceServiceSpec Replaced CpsDataPersistenceServiceTest with CpsDataPersistenceServiceSpec Replaced CpsModulePersistenceServiceTest with CpsModulePersistenceServiceSpec Extracted out common integration test base Rationalised test (there was a lot of duplication already!) Issue-ID: CPS-160 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I3311533fba1398feb00b6adf4209399cea8d3a1b
2021-01-27Draft at proposal where the DataNodeBuilder 'replaces' yang Utils to buidl a ↵ToineSiebelink1-8/+9
DataNode Most complexity is related to immutable collections and the fact taht we are adding data while recursing over the orignal data in an uncontrolled order. I cleaned it up as best I could with no logic in DataNode. Espcially the handling of LitLeaves requires some specialed handling. Thsi is just a draft solution for that I still propose we get back to that in dedicated user stories for handling the various types of Yang elements Hope this helps... Issue-ID: CPS-137 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Iab7cfcff67412c01bcdab95e707e1350bf60fab1
2021-01-25Add DataNodeDoesNotExist Exceptionniamhcore1-2/+2
Issue-ID: CPS-182 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I05fdd0fbc207e4806c187b96d35d7b6c54b795ea
2021-01-22Add another Child to a Fragment that has already at least one Childniamhcore2-53/+96
Issue-ID: CPS-164 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ib6a4f8ce4fc9247726e016ecaa0b1e45ff11bdbb
2021-01-21Add checkstyle rule for unused importsClaudio David Gasparini1-2/+0
Issue-ID: CPS-89 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I2cb1f758c9d2f451c11a607a84e1f196ae087165
2021-01-18Delete schema set - persistence layerRuslan Kashapov2-12/+108
Issue-ID: CPS-121 Change-Id: I6fc8343969971b76d7f78ad202dd8ec1058c03fb Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-18Persisting data nodes (fragments tree structure)niamhcore2-0/+172
Issue-ID: CPS-136 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I559afad41bf0eab1cc98c777a418b348c9c1b81c
2021-01-15Retrieve the SchemaSet resources for an AnchorRishi.Chail2-9/+43
Issue-ID: CPS-135 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: Ib7c17c5180212c7dd3b96cf27797c84166041cf9
2021-01-13Rename entity artifacts, remove obsolete entitiesRuslan Kashapov2-25/+25
Issue-ID: CPS-162 Change-Id: I10604e12a01f22930278118830eed53f5a2b159c Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-13Decouple anchor from fragment in persistence moduleRuslan Kashapov3-15/+16
Issue-ID: CPS-161 Change-Id: Ia446b26ee4eca9281e86bd2be3dd6836aa201597 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-01-11Rework CpsModulePersistenceServiceClaudio David Gasparini1-1/+4
- remove getModuleReferences - provide service returning YangTextSchemaSourceSet Issue-ID: CPS-21 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I61cf6450c8ed8a5154990ea19467e016dc1155b4
2021-01-06Create dataspaceRuslan Kashapov1-0/+19
Issue-ID: CPS-134 Change-Id: Ie7f00f9c322a12a6c2a71c1407f6970a7dd24d2d Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-12-28Fix test container remain in docker after tests completion. IMPORTANT.Ruslan Kashapov1-1/+5
Issue-ID: CPS-124 Change-Id: I6e423792c1a63d0f828577ca01d32366d2e693bb Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-12-17Associate anchor to schema setRuslan Kashapov3-0/+153
- db schema updated - db layer tests provided for ancor create and reading by dataspace - anchor model is removed from rest api as extra - api/spi updated to use string references instead of object Issue-ID: CPS-99 Change-Id: Ideeb83fa9e91ec1816308d8327a6589b999c64c5 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-12-14Yang resource name persistenceRuslan Kashapov2-18/+29
Issue-ID: CPS-125 Change-Id: I5ee2e893dd7c30abe86287150e8bef62966dd909 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2020-12-10Fixing Merge IssueToineSiebelink1-3/+4
Issue-ID: N/A Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I03ccd5f2dd260af6ef28524d8a44114c516dfb19
2020-12-08Persistence layer testing incl CpsModulePersistenceService testingRuslan Kashapov6-0/+267
Issue-ID: CPS-95 Change-Id: I5eba5f6953f483304ff3864914e7a6c9b2bb3f56 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>