From 7a697663603a0d3a955076b1a36ce674e62d3ab7 Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Wed, 6 Oct 2021 11:47:23 -0400 Subject: Add missing code for Metrics and PV/PVC elimination Earlier patch introducing MeterRegistry to AbstractComponentFunction was not initializing the lateinit property and causing NPE. Also add additional code to handle compatibility issues after the introduction of PV/PVC elminiation for CommandExecutor. This allows blueprintsprocessor to communicate with earlier versions of command- executor which still use the shared pvc. Issue-ID: CCSDK-3471 Change-Id: I84a04601c4fe09c5f3a06664ce877800a30531f1 Signed-off-by: Jozsef Csongvai --- .../cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ms/blueprintsprocessor/modules/inbounds/resource-api/src') diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt index 945a30c64..7586032a0 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt @@ -16,6 +16,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.resource.api +import io.micrometer.core.instrument.MeterRegistry import kotlinx.coroutines.runBlocking import org.junit.Test import org.junit.runner.RunWith @@ -25,6 +26,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogS import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest +import org.springframework.boot.test.mock.mockito.MockBean import org.springframework.context.annotation.ComponentScan import org.springframework.http.MediaType import org.springframework.test.context.ContextConfiguration @@ -51,6 +53,9 @@ class TemplateControllerTest { @Autowired lateinit var webTestClient: WebTestClient + @MockBean + lateinit var meterRegistry: MeterRegistry + var resolutionKey = "7cafa9f3-bbc8-49ec-8f25-fcaa6ac3ff08" val blueprintName = "baseconfiguration" val blueprintVersion = "1.0.0" -- cgit 1.2.3-korg