Fix incorrect use of getAnchors(dataspace, schemasets) 05/138305/3
authordanielhanrahan <daniel.hanrahan@est.tech>
Fri, 21 Jun 2024 10:12:45 +0000 (11:12 +0100)
committerDaniel Hanrahan <daniel.hanrahan@est.tech>
Tue, 25 Jun 2024 12:38:47 +0000 (12:38 +0000)
commit7915e994ac4eb403461b3a93165a2e3c72871ab6
tree789a2d6e89333327e7ae044073d917e7b5cf542f
parent37d82d5d54ede4c05862fe648911c383d253cec3
Fix incorrect use of getAnchors(dataspace, schemasets)

There is an issue in a method deleteDataNodes(dataspace, anchors)
where it doesn't send data update events. This is because it fetches
anchors using a method getAnchors(dataspace, schemaSetNames), when it
needs to fetch anchors by name: getAnchors(dataspace, anchorNames)

Changes:
- Rename getAnchors method using schemasets to getAnchorsBySchemaSetNames
- Add a method getAnchors(dataspace, anchorNames)
- Update test of deleteDataNodes method using getAnchors so it checks
  that data update events are sent

Issue-ID: CPS-2254
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I55fe853f0a9278a66a5724bf4cf2723b0e2fbc8b
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java
cps-service/src/main/java/org/onap/cps/api/CpsAnchorService.java
cps-service/src/main/java/org/onap/cps/api/impl/CpsAnchorServiceImpl.java
cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java
cps-service/src/main/java/org/onap/cps/spi/CpsAdminPersistenceService.java
cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAnchorServiceImplSpec.groovy
cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy
cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsAnchorServiceIntegrationSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataspaceServiceLimitsPerfTest.groovy