diff options
author | niamhcore <niamh.core@est.tech> | 2021-12-13 10:34:52 +0000 |
---|---|---|
committer | niamhcore <niamh.core@est.tech> | 2021-12-14 14:24:04 +0000 |
commit | 3aeb338680572b151e88c4065a541fc859f585be (patch) | |
tree | 7ad1e4949e60545473fdc75d5484e3d44b2beb81 /cps-ncmp-service/src/test/groovy/org/onap | |
parent | 5af63eb8c5a32180f1c1d52048fe3390305dc4ac (diff) |
Add exception handling to delete schema set when a registration is removed
Issue-ID: CPS-783
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: Ief4c6727e788822bc29379a757d25dff14f68c94
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org/onap')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplRegistrationSpec.groovy | 13 |
1 files changed, 13 insertions, 0 deletions
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 41084541c2..8c3e593da1 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() |