X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Fimpl%2FNetworkCmProxyDataServiceImplRegistrationSpec.groovy;h=8c3e593da1c0c14a326965a9c0a69dc5fe2bd6a4;hb=3aeb338680572b151e88c4065a541fc859f585be;hp=41084541c2a1a7d5cf5d14feff53daa1b6942e4d;hpb=5af63eb8c5a32180f1c1d52048fe3390305dc4ac;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy index 41084541c..8c3e593da 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy @@ -126,6 +126,19 @@ class NetworkCmProxyDataServiceImplRegistrationSpec extends Specification { noExceptionThrown() } + def 'Register a DMI Plugin for the given cm-handle(s) with no schema set found during delete process.'() { + given: 'a registration' + def objectUnderTest = getObjectUnderTestWithModelSyncDisabled() + def dmiPluginRegistration = new DmiPluginRegistration(dmiPlugin:'my-server') + dmiPluginRegistration.removedCmHandles = cmHandlesArray + and: 'an exception occurs during delete schema set process' + mockCpsModuleService.deleteSchemaSet(_,_,_) >> { throw (new Exception('')) } + when: 'registration is updated and modules are synced' + objectUnderTest.updateDmiRegistrationAndSyncModule(dmiPluginRegistration) + then: 'delete list or list element is still called' + 1 * mockCpsDataService.deleteListOrListElement(_,_,_,_) + } + def 'Dmi plugin registration with #scenario'() { given: 'a registration ' def objectUnderTest = getObjectUnderTestWithModelSyncDisabled()