summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test
diff options
context:
space:
mode:
authorLee Anjella Macabuhay <lee.anjella.macabuhay@est.tech>2024-01-10 15:05:30 +0000
committerGerrit Code Review <gerrit@onap.org>2024-01-10 15:05:30 +0000
commit958248ec5b935c6608a0f74c8aaf9627a16e2534 (patch)
tree380ab22aa69f0297cc7279c900ab29d42b6154f3 /cps-ncmp-service/src/test
parent34ac8e767246788afb5eeefa221acb5e587f568d (diff)
parent926d40875fecb3c11e4103dfdaf00ac615de3cdc (diff)
Merge "Remove inefficient saveListElementsBatch API"
Diffstat (limited to 'cps-ncmp-service/src/test')
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/inventory/InventoryPersistenceImplSpec.groovy10
1 files changed, 5 insertions, 5 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/inventory/InventoryPersistenceImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/inventory/InventoryPersistenceImplSpec.groovy
index 297f18c989..cb2f3fdddd 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/inventory/InventoryPersistenceImplSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/inventory/InventoryPersistenceImplSpec.groovy
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2022-2023 Nordix Foundation
+ * Copyright (C) 2022-2024 Nordix Foundation
* Modifications Copyright (C) 2022 Bell Canada
* Modifications Copyright (C) 2023 TechMahindra Ltd.
* ================================================================================
@@ -227,12 +227,12 @@ class InventoryPersistenceImplSpec extends Specification {
when: 'the cm handles are saved'
objectUnderTest.saveCmHandleBatch([yangModelCmHandle1, yangModelCmHandle2])
then: 'CPS Data Service persists both cm handles as a batch'
- 1 * mockCpsDataService.saveListElementsBatch(NCMP_DATASPACE_NAME, NCMP_DMI_REGISTRY_ANCHOR,
+ 1 * mockCpsDataService.saveListElements(NCMP_DATASPACE_NAME, NCMP_DMI_REGISTRY_ANCHOR,
NCMP_DMI_REGISTRY_PARENT, _,null) >> {
args -> {
- def jsonDataList = (args[3] as List)
- (jsonDataList[0] as String).contains('cmhandle1')
- (jsonDataList[0] as String).contains('cmhandle2')
+ def jsonData = (args[3] as String)
+ jsonData.contains('cmhandle1')
+ jsonData.contains('cmhandle2')
}
}
}