summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy/org
diff options
context:
space:
mode:
authorJoseph Keenan <joseph.keenan@est.tech>2022-05-20 08:40:21 +0000
committerGerrit Code Review <gerrit@onap.org>2022-05-20 08:40:21 +0000
commitc0b1de6357e294dffdf5ce0219950e0b3bf374ce (patch)
tree4e5b8d777f4f52df14ba69f4cb24e13e959af72a /cps-ncmp-service/src/test/groovy/org
parentb0623697898de50afce9a4d23085594d5e8d2ef7 (diff)
parentef62391fb034f599f92b113e27f90f7cedc1a5c0 (diff)
Merge "URI is not absolute when service name is not set"
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org')
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/YangModelCmHandleRetrieverSpec.groovy12
1 files changed, 12 insertions, 0 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/YangModelCmHandleRetrieverSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/YangModelCmHandleRetrieverSpec.groovy
index beea1faada..5ecc8b0da3 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/YangModelCmHandleRetrieverSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/YangModelCmHandleRetrieverSpec.groovy
@@ -79,4 +79,16 @@ class YangModelCmHandleRetrieverSpec extends Specification {
and: 'the result is not returned'
result == null
}
+
+ def "Handling missing service names as null CPS-1043."() {
+ given: 'the cps data service returns a data node from the DMI registry with empty child and leaf attributes'
+ def dataNode = new DataNode(childDataNodes:[], leaves: [:])
+ mockCpsDataService.getDataNode('NCMP-Admin', 'ncmp-dmi-registry', xpath, INCLUDE_ALL_DESCENDANTS) >> dataNode
+ when: 'retrieving the yang modelled cm handle'
+ def result = objectUnderTest.getYangModelCmHandle(cmHandleId)
+ then: 'the service names ae returned as null'
+ result.dmiServiceName == null
+ result.dmiDataServiceName == null
+ result.dmiModelServiceName == null
+ }
}