aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2017-09-13 14:19:34 +0530
committerojasdubey <ojas.dubey@amdocs.com>2017-09-13 14:19:34 +0530
commit8b88bfc6fa6e86e92fe7fe2cb6e83c653b520b9c (patch)
treede3f2481d6d6045b66cd5107623e3be4ea1d0c1f /openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test
parenta86090754b89714596794a533631b798f45bb302 (diff)
Bugfix - Missing SNMP Trap artifact in VF level
Updated the path for storing the Mib artifacts in onboarding csar Issue ID: SDC-320 Change-Id: I61f76ed98d1a598a88a63c5a0d6c641424a012fc Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test')
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java
index 5f1a67138d..3730a15465 100644
--- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java
@@ -31,6 +31,8 @@ import org.openecomp.core.model.dao.EnrichedServiceModelDao;
import org.openecomp.core.model.types.ServiceArtifact;
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.sdc.enrichment.EnrichmentInfo;
+import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
+import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductDao;
@@ -52,11 +54,6 @@ import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.times;
-/**
- * @author shiria
- * @since November 06, 2016.
- */
-
public class MonitoringMibEnricherTest {
@Mock
private ComponentArtifactDao componentArtifactDaoMock;
@@ -89,15 +86,16 @@ public class MonitoringMibEnricherTest {
monitoringMibEnricher.enrichComponent(componentEntity, vspId, version);
String componentName = componentEntity.getComponentCompositionData().getName();
-
+ String unifiedComponentName =
+ ToscaNodeType.ABSTRACT_NODE_TYPE_PREFIX + DataModelUtil.getNamespaceSuffix(componentName);
ArgumentCaptor<ServiceArtifact> expectedServiceArtifact =
ArgumentCaptor.forClass(ServiceArtifact.class);
Mockito.verify(enrichedServiceModelDaoMock, atLeastOnce())
.storeExternalArtifact(expectedServiceArtifact.capture());
- Assert
- .assertEquals(expectedServiceArtifact.getValue().getName().startsWith(componentName), true);
+ Assert.assertEquals(expectedServiceArtifact.getValue().getName()
+ .startsWith(unifiedComponentName), true);
Assert.assertEquals(expectedServiceArtifact.getValue().getName(),
- componentName + File.separator + ArtifactCategory.DEPLOYMENT.getDisplayName() +
+ unifiedComponentName + File.separator + ArtifactCategory.DEPLOYMENT.getDisplayName() +
File.separator + MonitoringUploadType.VES_EVENTS + File.separator + "mib1.yml");
}