summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test
AgeCommit message (Collapse)AuthorFilesLines
2021-09-29CPS-594: Exception when updating list node PATCHDylanB95EST2-6/+77
SQL ConstraintViolationException updating the list node element using PATCH List node API - Took advantage of replaceDataNodeTree to replace list node children recursively - Added functionality to exclude the updated dataNodes when removing the list node descendants Issue-ID: CPS-594 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Change-Id: Idbf580fab05581513b52327d6895b9e39b4cf470 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2021-09-21Merge "Updating fetch all yang modules queries and tests"Toine Siebelink2-5/+6
2021-09-20Updating fetch all yang modules queries and testsniamhcore2-5/+6
Issue-ID: CPS-670 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I11e6da303320aea096a135eb93e270a5fd014740
2021-09-14Add test for missing code covereageToineSiebelink2-8/+28
- Add test for error scenarios and otehr mising tests - set up for SpringBean testing - some small typo fixes - fixed some SQ violations Issue-ID: CPS-656 Change-Id: If33f215c8ecaf090f27145005cc1aa7f0331d0f4 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2021-09-07P2 - Get module names and revisions rest layerniamhcore1-2/+2
Issue-ID: CPS-485 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I1bcf45902207d0dba6b5dfe8277cb06571694db3
2021-09-06P1 - Get module name and revision persistence layerniamhcore3-26/+48
Rename ModuleReference to ExtendedModuleReference Create new ModuleReference class (moduleName and revision) Update existing sync model flow to use new module reference class Create native query to get module name and revision Issue-ID: CPS-485 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I0d0da7742ceef3a68e83a5dd4852091e6adf138b
2021-09-03Ensure Leaf value retains Integer typelukegleeson1-1/+27
BUG GSON.fromJson() is unable to parse numerical values and defaults values to Doubles Added a datatype conversion which forces Double values which can be Integers to being Integers Issue-ID: CPS-591 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I72d54ad06823a8755ee407f39104f3edf9a8cc75
2021-08-18Merge "CPS-508: Create anchor/schemaset from new modules and existing modules"Niamh Core2-11/+22
2021-08-17CPS-508: Create anchor/schemaset from new modules and existing modulesshivasubedi2-11/+22
Issue-ID: CPS-508 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: I8023a093334b77d0220f7c7d94de66863f5ba6dd
2021-08-17Delete list-node p1 service and persistence layerslukegleeson2-13/+65
Persistence Layer of delete List-Node Content Service Layer of delete List-Node Content Updating of deprecated FragementRepository.getOne() method to FragmentRepository.getByID() in CpsDataPersistenceServiceIntegration.groovy Remove Runtime Exceptions thrown from CpsDataService.java javadoc Issue-ID: CPS-361 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ib5762e73a6e8620c50c2e07b00086b9287770bc3
2021-08-05CPS-506: List all known modules and revisionshivasubedi2-14/+59
Issue-ID: CPS-506 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: Id76fecc7dd10625cc3ecb940b1181b1e8bf829a1
2021-07-23Renamed UnitSpec to SpecRenu Kumari1-1/+1
Issue-ID: CPS-501 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Ie1878c6a271a335320e854b81b7f664762d64fbf
2021-07-23Renamed test spec to Integration SpecRenu Kumari1-1/+1
Issue-ID: CPS-501 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: I641b519237c21f2998582b2ba025b00e2e29152f
2021-07-22Merge "Fixed inconsistent data issue with replaceNode"Bruno Sakoto2-4/+118
2021-07-21Fixed inconsistent data issue with replaceNodeRenu Kumari2-4/+118
Issue-ID: CPS-501 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Ic4785d97013729b80f81aca3de4430bdaa8155fa
2021-07-20Support text() conditionToineSiebelink7-25/+146
- Added Antlr parsing of text() condition (as an optional additional to any query) - Implemented text-condition combined with descendants - Refactor descendants queries into using one more flexible Custom (native) Query builder - Refactor ALL cpsPath queries to now use FragmentRepositoryCpsPathQuery (custom query builder) - Refactor Antrl code to simply parsing of cpsPath and allow all combinations (no more query types, addresses CPS-436) - Minor clean up of some minor convention issues in CpsAdminServiceImplSpec.groovy (found during groovy demo) - Update .rst documentation of xPaths - Fixed incorrect matching of additional list indexes using more precise SIMILAR-TO regex in postgreSQL - Documented special chararter limitation (CPS-500) - Checked for consistent use of term 'CPS path' in documentation and error message - Included (updated) copyright in all .SQL test files Issue-ID: CPS-452 Issue-ID: CPS-436 Issue-ID: CPS-500 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: If422d25cafd2850d25c9a28dea16ba7a5f93dddb
2021-07-16Rename CpsModulePersistenceServiceSpec test classBruno Sakoto1-1/+1
Issue-ID: CPS-493 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Ib1a69de41317e130ec993779547e47341a77d498
2021-07-13Editing of Nordix Licenses to ONAP guidelineslukegleeson5-5/+10
Issue-ID: CPS-489 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I415534515b3d8325f41d5dc1d02c6e0ae70c6cf1
2021-07-09Support concurrent requests to create schema setsBruno Sakoto2-1/+91
Issue-ID: CPS-466 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: I2ecf98b9aa5a6097518e616c08f8bb2a2182a613
2021-06-18Missing licence info added in pom fileshivasubedi1-0/+17
- Added licence info to files that were missing it - Fixed licence info to match with the creator of the file Issue-ID: CPS-467 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: I1c0eaedb2c87743a61a1cd58f33b0d0d04b3a977
2021-06-01Introducing Antlr4 for cpsPath parsingToineSiebelink2-129/+9
-created new module for cpPathParser -added antlr rule for cpsPathWithSingleLeafCondition -added antlr rule for cpsPathWithDescendant (and with leaf conditions) -added antlr rule for ancestor axis -added unit test (copied from existing CpsPathQuerySpec) -udpated cps-ri to use new cpPathQuery from parser module -'imported' lexer rules from publix xPath grammar -Re-used existing CpsPathException but conversion happens in cps-ri to prevent additional dependency in cps-path-parser module Issue-ID: CPS-376 Change-Id: I2c5df98969402cbf69f6573c52705879450ce606 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2021-05-28Load only required components in the application contextsRenu Kumari1-1/+2
Issue-ID: CPS-434 Signed-off-by: Renu Kumari <renu.kumari@bell.ca> Change-Id: Iacc12946495b9e6ec42b4b7d4e3b5b010fecceb5
2021-05-24Replace list-node content (part 1): CPS Service and persistence layersRuslan Kashapov1-0/+30
Issue-ID: CPS-362 Change-Id: I669c9fc6ef67c1992fe95e17a765f0c616b00f7e Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-05-11Create list-node elements (part1): CPS service and persistence layersRuslan Kashapov2-17/+50
+ fix integrity violation exception exposed out of persistence layer + refactor CpsDataServiceImplSpec to eliminate repeated code Issue-ID: CPS-360 Change-Id: Id70341fe54bf3c31af661f6aae04a7a80f4a1e9d Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
2021-05-07Add CpsPathQueries.sql and create data inspired by the bookstore modelniamhcore4-52/+74
Issue-ID: CPS-363 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I1eaee97d6ced7b0c0676de19d74b4d8262a5e811
2021-05-04Fix ancestor cps path to recognize ancestor list valueniamhcore1-8/+9
Issue-ID: CPS-305 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I28f7f0c120a39190068a3192dccf0a1a6fbfeaf2
2021-04-30Implement cps path query to get ancestor by schema node identifierToineSiebelink4-81/+82
Cleaned up some legcy issues in related testware Issue-ID: CPS-305 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ic4b21308478f399e3a454dbcd73943e077b0f3f2 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2021-04-30Fix Get descendent to support xpaths that end in list valuesputhuparambil.aditya2-15/+33
Issue-ID: CPS-367 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I3234afd8b8b69c5a3c87db1669d9b304f9fcaa49
2021-04-29Investigate and update Spock versionshivasubedi5-30/+1
Issue-ID: CPS-368 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: Ie8505cf29068660af6bc6b9887f593f7e3be074f
2021-04-26Merge "Leaf String value comparison matches mix of single and double quotes"Rishi Chail1-2/+20
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-26Leaf String value comparison matches mix of single and double quotesshivasubedi1-2/+20
Issue-ID: CPS-345 Signed-off-by: shivasubedi <shiva.subedi@est.tech> Change-Id: Id6db86817878ed5ed8ccaed4a9a71c5a06d6f97c
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