diff options
author | seanbeirne <sean.beirne@est.tech> | 2024-08-26 10:48:20 +0100 |
---|---|---|
committer | Priyank Maheshwari <priyank.maheshwari@est.tech> | 2024-09-04 08:32:12 +0000 |
commit | 196fc1208e74ac8950c6598a53a225c8951cceea (patch) | |
tree | b711fa6b8e9f230d41ed847a8afc64d7a0900d54 /cps-ncmp-service/src/test/groovy/org | |
parent | 7045c11f9b7a49c9b711a2a61b299bf886dc0836 (diff) |
Support Alternate-id for CPS-E05 module search
Issue-ID: CPS-2370
Change-Id: I0ca3a1df232ad9fd9f76695cd6ea21d36919130d
Signed-off-by: seanbeirne <sean.beirne@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy index 3352c264a2..be2bf87df0 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy @@ -51,7 +51,6 @@ class NetworkCmProxyInventoryFacadeSpec extends Specification { def mockTrustLevelManager = Mock(TrustLevelManager) def mockAlternateIdMatcher = Mock(AlternateIdMatcher) def objectUnderTest = new NetworkCmProxyInventoryFacade(mockCmHandleRegistrationService, mockCmHandleQueryService, mockParameterizedCmHandleQueryService, mockInventoryPersistence, spiedJsonObjectMapper, mockTrustLevelManager, mockAlternateIdMatcher) - def trustLevelPerCmHandle = [:] def 'Update DMI Registration'() { given: 'an (updated) dmi plugin registration' @@ -90,11 +89,17 @@ class NetworkCmProxyInventoryFacadeSpec extends Specification { assert result.containsAll('cm-handle-1','cm-handle-2') } - def 'Getting Yang Resources.'() { + def 'Getting Yang Resources for a given #scenario'() { when: 'yang resources is called' - objectUnderTest.getYangResourcesModuleReferences('some-cm-handle') - then: 'CPS module services is invoked for the correct dataspace and cm handle' + objectUnderTest.getYangResourcesModuleReferences(cmHandleRef) + then: 'alternate id matcher is called' + mockAlternateIdMatcher.getCmHandleId(cmHandleRef) >> 'some-cm-handle' + and: 'CPS module services is invoked for the correct cm handle' 1 * mockInventoryPersistence.getYangResourcesModuleReferences('some-cm-handle') + where: 'following cm handle reference is used' + scenario | cmHandleRef + 'Cm Handle Reference as cm handle-id' | 'some-cm-handle' + 'Cm Handle Reference as alternate-id' | 'some-alternate-id' } def 'Get a cm handle.'() { |