summaryrefslogtreecommitdiffstats
path: root/integration-test/src/test/resources
AgeCommit message (Collapse)AuthorFilesLines
2024-02-19Tests of CM-handle module upgrade & moduleSetTagdanielhanrahan6-96/+48
Integration tests covering scenarios of the creation and upgrade of CM-handles with: - no moduleSetTag - new moduleSetTag - existing moduleSetTag Failing tests are marked @Ignore. Issue-ID: CPS-2102 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Id5567e08a13d8c26dc7b6458f0af8449bef6f082
2024-02-15Add NCMP to integration-test moduledanielhanrahan3-0/+190
- Add NCMP to integration test base class - Use MockRestServiceServer to mock DMI responses in groovy tests - Added tests for CM-handle registration to READY and LOCKED states - Add test of CM-handle deregistration Issue-ID: CPS-2033 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I89f9f8aab2bba9d4eb5b3136a2feb238e7cf1b06
2024-02-14Clean up of integration-test base classesdanielhanrahan1-3/+91
- Remove TestConfig and instead use auto-configuration - Add needed application.yml config - Refactor helper methods for creating JSON Issue-ID: CPS-2090 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I4f618a1d4a83e9c75e468928c257b817d449c22f
2024-02-13Remove liquibase test changelogdanielhanrahan2-629/+1
Complete liquibase changelog takes under 1 second to run, so having separate changelog for integration tests offers no benefit. Issue-ID: CPS-2090 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib0e928f35d401b91c23dfcb5dc82c77778a044dc
2024-02-12Fix test failure by ordering leaf-listsdanielhanrahan1-0/+6
YANG specifies two ways that leaf-lists can be ordered: - ordered-by user: original order in JSON is preserved - ordered-by system (default): it is up to the system how to order For leaf-lists to preserve same order as the JSON, the Yang module must specify 'ordered-by user'. To ensure consistent behaviour even when system ordering is used, the leaf-list is sorted during parsing. - Add 'ordered-by user' to authors field in bookstore.yang - Sort leaf-list during parsing when using 'ordered-by system' - Add new tests to verify ordering Issue-ID: CPS-2057 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6ab688ec2fa4a22182e853d1a8b26642f278c40a
2024-02-01Add integration test for extending API: Get Module Definitionshalil.cakal2-8/+30
- Add new module: bookstore-types - Import the new module from stores module - Change integration testwares to comply with the new module - Add new integration test for retrieving module definition Issue-ID: CPS-1135 Change-Id: Ib51c998ceeab50d3fcea212ed55c8ab50ca09257 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-01-16CPS Delta API: Update action for delta serviceArpit Singh1-3/+2
- Added code for Update action in Delta service - added method to get updated Leaf data: getUpdatedLeavesBetweenSourceAndTargetDataNode - added method to compare Leaf data common in source and target data node - added method to process leaves unique to target data node - added method to compare leaves: compareLeaves - added method to store updated data to a DeltaReport: addUpdatedLeavesToDeltaReport - Added corresponding testware Issue-ID: CPS-1824 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: I3de07ea3227988784a0892f6a92c238ecf00a7fa
2024-01-10Enable hibernate write batchingdanielhanrahan2-8/+15
- Implement fragment ID sequence generator with allocation size of 100 - Enable write batching for insert and update, with batch size of 100 - Write performance is over 2x faster Issue-ID: CPS-1795 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7ebd0f834abb57c593603e2cd3fafc7e3425ab1e
2023-12-14Update Model to allow Persisting of alternateIdleventecsanyi1-1/+18
- added new dmi model registry and modified tests Issue-ID: CPS-1989 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I576a5a0704fe28924dcc304c276fec5665b52764
2023-11-14CPS Delta API 1: Delta between 2 anchorsArpit Singh2-0/+203
- CPS Delta Feature Part 1: To find delta between two anchors - created new endpoint deltaByDataspaceAndAnchors - endpoint to take dataspaceName, source anchor, target anchor, xpath, descendants as input - added new service CpsDeltaService - added method to find delta between DataNodes: getDeltaReport - added method to find removed data nodes: getRemovedDeltaReports - added method to get Added DataNodes: getAddedDeltaReports - added method to get Map of xpath to DataNode: convertToXPathToDataNodesMap - added a POJO for delta report - Added new JSON data for delta feature testing - Added groovy test files CpsDeltaServiceImplSpec and DeltaReportBuilderSpec - code related to update operation, will be added in separate commit Issue-ID: CPS-1824 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: I313f0f71d04b03878be7643f709d8af1aa6df6ba
2023-09-27Uplift Spring Boot to 3.1.2egernug1-1/+1
To align with Ericsson Spring Boot is being uplifted to version 3.1.2 Issue-ID: CPS-1888 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Icfe97df15ab67a7fb25e0a98e4bbbbe91f332321
2023-09-25CM Data Subscriptions PoC/Performance testToineSiebelink1-0/+49
- New model introduced in test can be ported to production code - Groovy test around the new use-cases can be used as a guid for actau production code solution - Current worst use-case about 10 secodn son windows laptop. is acceptable as per Requiremenyt of 30 second - TODO: update test limits/expectations based on CI results Issue-ID: CPS-1881 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I05f3adf7f9cc4d9a9c94a8435a392ed76f9fad66
2023-08-18CPS-Core : Expose a java interface to update schema setsourabh_sourabh4-0/+76
- Exposed an interface to update anchor by schema set name. - New interface is implemented into RI model. - New native query is exposed to update id with given schema set name. - A new integration test is written to test new interface into cps core. Issue-ID: CPS-1800 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ibf44712e11b53cb6673b04b9e3fd864321c90839 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-07-27Fix: Make bookstore data consistentArpit Singh2-24/+14
- Removed list named invoice from all bookstore files - Added a new parent list as bookstore-address - Refactored tests Issue-ID: CPS-1813 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: I5c7e83e1ee0ad9ac1d94d1906c2361c7a00d49af
2023-07-20Merge "Persisting a list element to a parent list (ep2)"Luke Gleeson2-0/+36
2023-07-18Persisting a list element to a parent list (ep2)Rudrangi Anupriya2-0/+36
Post List Element does not allow for create List Element, only appends onto existing node as children -Add a check in saveListElements to see if the parent xpath is a root path ("/").If root node store list element as top node. Else add passed list element to parent xpath node. -Add test for scenario for above -Add test scenario Saving list element data fragment under Root node -Add Integration Tests Add and Delete top-level list (element) data nodes with root node -Update bookstore model with TopLevelList datanode Issue-ID: CPS-1586 Change-Id: Iaa7f59fbeebb03703626132c6d5c2afde0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-07-17Allow duplicate leaf names in Cps Path leaf conditiondanielhanrahan1-1/+77
Presently, a query using the same leaf name twice will fail: //books[@price > 10 and @price < 20] It is caused by storing data leaves in a Map. This is fixed by storing data leaves in a List<DataLeaf>. Issue-ID: CPS-1779 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie6990ea5e622cf37e986b720a0a07fb69ce4f03b
2023-06-12Move integration test (DataService)ToineSiebelink1-0/+2
- Moved all Data Intergation Test - Added/improved some module Moudle Servcie test too - Removed some unused (impossible) code-paths in prod code - Replaced null's with meaningful strings (in edge case scenarios) - Replaced @Shared with static (shorter) in some test Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ib4b1ec1706ace7e3f5ac03d85177a6f7d4f6b8d0
2023-05-17Entity ID types do not match types in database definitionToineSiebelink1-3/+3
As Liquibase is used, JPA does not manage database definition. Within Liquibase changelog, only Anchor and Fragment have BIGINT (Long) IDs. Other entities have INTEGER IDs. - Change AnchorEntity/AnchorRepository ID type to Long - Change YangResourceEntity/YangResourceRepository and ModuleReferenceRepository ID to Integer - Modify datatypes of foreign key references in liquibase changelog to use correct types for dataspace_id, schema_set_id, yang_resource_id - Update test liquibase changelog Issue-ID: CPS-1676 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I26de6712b2e74d166fc5a48b1f8149de6a1e5199 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2023-05-12Remove dataspace_id column from Fragment tabledanielhanrahan1-32/+4
- Remove dataspace_id column from fragment table and drop associated index, foreign key constraint and uniqueness constaint. - Add uniqueness constraint using only fragment xpath and anchor_id. - Add not-null constraint to anchor_id. - Update code and test data to remove references to dataspace_id. - Repopulate the dataspace_id in Liquibase rollback (verified with manual testing of update/rollback). Issue-ID: CPS-1677 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I467cccba25ac5d884ec790064ca58150281b7e1d
2023-05-10Move integration test (DataService)ToineSiebelink1-0/+9
- dropped ri module coverage to alow for move - removed performance tests (already better tests in intergration module) - added 'save' iue cases in new integration-test - removed no longer used version for save single data node (todo: remove old tests for similar functionality, will wait until new test cover same) Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I4c2e788e0a313938a923cd1e7e52584d739ec6f4
2023-04-21Add cascade delete fragments to liquibase test configdanielhanrahan1-0/+34
Cascade delete was added to fragments table in main DB changelog, but not to integration-test changelog. Issue-ID: CPS-1617 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If85f120dfdc4bf3e9c8a1dde2b982378560d418a
2023-04-12Migrate query tests to integration-test module #5danielhanrahan2-0/+35
- Migrate query tests for composite keys to integration-test - Add addresses with composite key to bookstore model Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6f8dfc2c44ae6ba3bac1cce804841671ef5a009d
2023-04-12Migrate query tests to integration-test module #3danielhanrahan1-0/+14
Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1d92355f272271424a7014057d251cf88eac0203
2023-04-12Merge "Migrate query tests to integration-test module #2"Sourabh Sourabh3-74/+100
2023-04-11Performance tests for getDataNodes and queryDataNodesdanielhanrahan1-10054/+400
- Generate openroadm data from a single innerNode.json template - Double the number of openroadm device nodes (25 -> 50) in tests - Add new performance tests for getDataNodes and queryDataNodes to integration-test module, using openroadm and bookstore data - Remove old performance tests from cps-ri Issue-ID: CPS-1524 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Id9ec2a86d984d6c50c9ae6093e7a62729cb851da
2023-04-11Migrate query tests to integration-test module #2danielhanrahan3-74/+100
- Migrate some query tests to integration-test - Edit bookstore model to add integer leaf-list 'editions' - Lower cps-ri code coverage Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If50bf15ad7d7f147448f6b60d464efc1cdc91005
2023-03-10Add schema_set_yang_resources index to testsdanielhanrahan1-0/+15
- Add missing index to liquibase test-changelog.yaml Issue-ID: CPS-1535 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I2f8ee9f66b3f433be2f61e17759f0f6c9f2e4707
2023-03-09Create Base and Sample Performance Integration TestsToineSiebelink8-13/+32698
- added data (folders) for different models and json data - added base and data for cps-ncmp (registry) specific test cases - integrated Ahila's (large) openroadm model and data (corrected version provided by Lee Anjella) - created profiles to exclude/include *PerfTest - fixed dependency test check - included integration test for overall coverage - increased margings in existing perf test to reduce nordix intermitten failures Issue-ID: CPS-1516 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ia82826f610636c14aa7e8939b385c278e5039817
2023-01-25Springboot Integration tests improvementslukegleeson5-0/+779
Creation of CpsIntegrationSpecBase Demonstration of test class implementing CpsIntegrationSpecBase in CpsPersistenceSpec Tests use reduced liquibase steps, basic bookstore yang model and bookstore json payload Issue-ID: CPS-1379 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I38202d0888808d08d85fce1aab45fc43e8b0cec3