From 76fb17f57bec04a96fc53f8c730755da4cbe2856 Mon Sep 17 00:00:00 2001 From: leventecsanyi Date: Thu, 23 May 2024 16:40:13 +0200 Subject: Restructure(package) DataJobs feature in NCMP Service - restructured already existing classes - added testware for AlternateIdMatcher Issue-ID: CPS 2240 Change-Id: I5691ed99627353903689cd2929163f77ed8c4eca Signed-off-by: leventecsanyi --- .../org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy | 4 ++++ .../performance/ncmp/CmHandleQueryByAlternateIdPerfTest.groovy | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'integration-test/src') diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy index 6952b2ad3..d1a661979 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy @@ -46,6 +46,7 @@ import org.onap.cps.spi.exceptions.DataspaceNotFoundException import org.onap.cps.spi.model.DataNode import org.onap.cps.spi.repository.DataspaceRepository import org.onap.cps.spi.utils.SessionManager +import org.onap.cps.ncmp.utils.AlternateIdMatcher import org.onap.cps.utils.JsonObjectMapper import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.autoconfigure.EnableAutoConfiguration @@ -114,6 +115,9 @@ abstract class CpsIntegrationSpecBase extends Specification { @Autowired InventoryPersistence inventoryPersistence + @Autowired + AlternateIdMatcher alternateIdMatcher + MockWebServer mockDmiServer = null DmiDispatcher dmiDispatcher = new DmiDispatcher() diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryByAlternateIdPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryByAlternateIdPerfTest.groovy index 4f33d030e..9504c9ec7 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryByAlternateIdPerfTest.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryByAlternateIdPerfTest.groovy @@ -22,7 +22,7 @@ package org.onap.cps.integration.performance.ncmp import org.onap.cps.integration.ResourceMeter import org.onap.cps.integration.performance.base.NcmpPerfTestBase -import org.onap.cps.ncmp.api.impl.inventory.InventoryPersistence +import org.onap.cps.ncmp.utils.AlternateIdMatcher import java.util.stream.Collectors @@ -32,10 +32,10 @@ import static org.onap.cps.spi.FetchDescendantsOption.OMIT_DESCENDANTS class CmHandleQueryByAlternateIdPerfTest extends NcmpPerfTestBase { - InventoryPersistence objectUnderTest + AlternateIdMatcher objectUnderTest ResourceMeter resourceMeter = new ResourceMeter() - def setup() { objectUnderTest = inventoryPersistence } + def setup() { objectUnderTest = alternateIdMatcher } def 'Query cm handle by longest match alternate id'() { when: 'an alternate id as cps path query' -- cgit 1.2.3-korg