aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2022-12-19 18:29:41 +0000
committerMichael Morris <michael.morris@est.tech>2023-01-03 12:26:48 +0000
commit4871b522afd7dfee773dc891cb94d3f1eaafb040 (patch)
tree4561d57b64992e929e0c39523e26d4c651733576 /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test
parent52d23fc161d88fba7fefc76b89478e8abab42970 (diff)
Fix 'Artifact type CONTROLLER_BLUEPRINT_ARCHIVE is not recognized based on its type'-bug
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: Iab23331c5eb2e8ff5526a877adab8babbadd86d9 Issue-ID: SDC-3216
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImplTest.java45
1 files changed, 21 insertions, 24 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImplTest.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImplTest.java
index 2cea0f73e3..b58a1f90d8 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImplTest.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImplTest.java
@@ -21,20 +21,18 @@
package org.openecomp.sdc.vendorsoftwareproduct.services.impl.filedatastructuremodule;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.List;
+import java.util.Optional;
import org.junit.jupiter.api.Test;
import org.openecomp.sdc.heat.datatypes.manifest.FileData;
import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;
-import java.util.List;
-import java.util.Optional;
-
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-
-public class ManifestCreatorNamingConventionImplTest extends ManifestCreatorNamingConventionImpl {
+class ManifestCreatorNamingConventionImplTest extends ManifestCreatorNamingConventionImpl {
private static final String ARTIFACT_1 = "cloudtech_k8s_charts.zip";
private static final String ARTIFACT_2 = "cloudtech_azure_day0.zip";
@@ -43,14 +41,13 @@ public class ManifestCreatorNamingConventionImplTest extends ManifestCreatorNami
private static final String ARTIFACT_5 = "cloudtech_openstack_configtemplate.zip";
private static final String PMDICT_YAML = "pmdict.yaml";
-
@Test
void testIsCloudSpecificArtifact() {
- assertTrue(isCloudSpecificArtifact(ARTIFACT_1));
- assertTrue(isCloudSpecificArtifact(ARTIFACT_2));
- assertTrue(isCloudSpecificArtifact(ARTIFACT_3));
- assertFalse(isCloudSpecificArtifact(ARTIFACT_4));
- assertFalse(isCloudSpecificArtifact(ARTIFACT_5));
+ assertTrue(isCloudSpecificArtifact(ARTIFACT_1, null));
+ assertTrue(isCloudSpecificArtifact(ARTIFACT_2, null));
+ assertTrue(isCloudSpecificArtifact(ARTIFACT_3, null));
+ assertFalse(isCloudSpecificArtifact(ARTIFACT_4, null));
+ assertFalse(isCloudSpecificArtifact(ARTIFACT_5, null));
}
@Test
@@ -63,15 +60,15 @@ public class ManifestCreatorNamingConventionImplTest extends ManifestCreatorNami
// when
Optional<ManifestContent> newManifest = new ManifestCreatorNamingConventionImpl()
- .createManifestFromExisting(vspDetails, fileDataStructure, existingManifest);
+ .createManifestFromExisting(vspDetails, fileDataStructure, existingManifest);
// then
assertTrue(newManifest.isPresent());
assertTrue(newManifest.get()
- .getData()
- .stream()
- .allMatch(fd -> fd.getType().equals(FileData.Type.PM_DICTIONARY) &&
- fd.getFile().equals(PMDICT_YAML)));
+ .getData()
+ .stream()
+ .allMatch(fd -> fd.getType().equals(FileData.Type.PM_DICTIONARY) &&
+ fd.getFile().equals(PMDICT_YAML)));
}
@Test
@@ -84,15 +81,15 @@ public class ManifestCreatorNamingConventionImplTest extends ManifestCreatorNami
// when
Optional<ManifestContent> newManifest = new ManifestCreatorNamingConventionImpl()
- .createManifestFromExisting(vspDetails, fileDataStructure, existingManifest);
+ .createManifestFromExisting(vspDetails, fileDataStructure, existingManifest);
// then
assertTrue(newManifest.isPresent());
assertTrue(newManifest.get()
- .getData()
- .stream()
- .allMatch(fd -> fd.getType().equals(FileData.Type.OTHER) &&
- fd.getFile().equals(PMDICT_YAML)));
+ .getData()
+ .stream()
+ .allMatch(fd -> fd.getType().equals(FileData.Type.OTHER) &&
+ fd.getFile().equals(PMDICT_YAML)));
}
private ManifestContent prepareManifestWithPmDictFileWithType(FileData.Type fileType) {