summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src
diff options
context:
space:
mode:
authorleventecsanyi <levente.csanyi@est.tech>2023-12-07 16:17:12 +0100
committerLevente Csanyi <levente.csanyi@est.tech>2023-12-13 10:37:34 +0000
commitd8be9ef1d451f3e19c0c73752ad3d947e8baa9bd (patch)
treefac70a881b7f65147b4ed9a460c1e02e78c9a1e2 /cps-ncmp-rest/src
parent7e94b26a666907cc97d692b8dda8364bb0a0ef45 (diff)
Modify cmHandle registration for alternateId
- added alternate id to the interface for persisting the new value - updated unit tests to validate the new field Issue-ID: CPS-1985 Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Change-Id: I81e61f2ea2ecc5d8c0938af00fa81a99e27e2e23
Diffstat (limited to 'cps-ncmp-rest/src')
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy5
1 files changed, 4 insertions, 1 deletions
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy
index c4dd91e117..0bc0c1e553 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy
@@ -41,7 +41,7 @@ class NcmpRestInputMapperSpec extends Specification {
def 'Convert a created REST CM Handle Input to an NCMP Service CM Handle with #scenario'() {
given: 'a rest cm handle input'
def inputRestCmHandle = new RestInputCmHandle(cmHandle : 'example-id', cmHandleProperties: registrationDmiProperties,
- publicCmHandleProperties: registrationPublicProperties, trustLevel: registrationTrustLevel)
+ publicCmHandleProperties: registrationPublicProperties, trustLevel: registrationTrustLevel, alternateId: 'my-alternate-id', moduleSetTag: 'my-module-set-tag')
def restDmiPluginRegistration = new RestDmiPluginRegistration(
createdCmHandles: [inputRestCmHandle])
when: 'to plugin dmi registration is called'
@@ -54,6 +54,9 @@ class NcmpRestInputMapperSpec extends Specification {
result.createdCmHandles[0].dmiProperties == mappedDmiProperties
result.createdCmHandles[0].publicProperties == mappedPublicProperties
result.createdCmHandles[0].registrationTrustLevel == mappedTrustLevel
+ and: 'alternate ID and module set tag converted correctly'
+ result.createdCmHandles[0].alternateId == 'my-alternate-id'
+ result.createdCmHandles[0].moduleSetTag == 'my-module-set-tag'
where: 'the following parameters are used'
scenario | registrationDmiProperties | registrationPublicProperties | registrationTrustLevel || mappedDmiProperties | mappedPublicProperties | mappedTrustLevel
'dmi and public properties' | ['Property-Example': 'example property'] | ['Public-Property-Example': 'public example property'] | 'COMPLETE' || ['Property-Example': 'example property'] | ['Public-Property-Example': 'public example property'] | TrustLevel.COMPLETE