aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/Messages.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java138
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java60
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/MANIFEST.json23
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/illegalTypeFile.yaml0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.env.illegalSuffix0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.yaml.illegalSuffix0
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/singleVol.yaml.illegalSuffix0
8 files changed, 147 insertions, 76 deletions
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/Messages.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/Messages.java
index 72ad3335a4..de33804dff 100644
--- a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/Messages.java
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/Messages.java
@@ -66,7 +66,7 @@ public enum Messages {
/* manifest errors*/
MISSING_FILE_IN_ZIP("Missing file in zip"),
MISSING_FILE_IN_MANIFEST("Missing file in manifest"),
- MISSING_FILE_NAME_IN_MANIFEST("Missing file name in manifest - %s"),
+ MISSING_FILE_NAME_IN_MANIFEST("Missing file name in manifest"),
MISSING_NESTED_FILE("Missing nested file - %s"),
MISSING_ARTIFACT("Missing artifact - %s"),
WRONG_HEAT_FILE_EXTENSION("Wrong HEAT file extension - %s"),
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java
index 79c4dc2d96..2ad2f9afb4 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/ManifestValidator.java
@@ -21,6 +21,7 @@
package org.openecomp.sdc.validation.impl.validators;
import org.openecomp.core.utilities.json.JsonUtil;
+import org.openecomp.core.validation.ErrorMessageCode;
import org.openecomp.sdc.validation.Validator;
import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
import org.openecomp.core.validation.types.GlobalValidationContext;
@@ -47,6 +48,14 @@ import java.util.Optional;
public class ManifestValidator implements Validator {
public static final MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static Logger logger = (Logger) LoggerFactory.getLogger(YamlValidator.class);
+ private static final ErrorMessageCode ERROR_CODE_MNF_1 = new ErrorMessageCode("MNF1");
+ private static final ErrorMessageCode ERROR_CODE_MNF_2 = new ErrorMessageCode("MNF2");
+ private static final ErrorMessageCode ERROR_CODE_MNF_3 = new ErrorMessageCode("MNF3");
+ private static final ErrorMessageCode ERROR_CODE_MNF_4 = new ErrorMessageCode("MNF4");
+ private static final ErrorMessageCode ERROR_CODE_MNF_5 = new ErrorMessageCode("MNF5");
+ private static final ErrorMessageCode ERROR_CODE_MNF_6 = new ErrorMessageCode("MNF6");
+ private static final ErrorMessageCode ERROR_CODE_MNF_7 = new ErrorMessageCode("MNF7");
+ private static final ErrorMessageCode ERROR_CODE_MNF_8 = new ErrorMessageCode("MNF8");
@Override
public void validate(GlobalValidationContext globalContext) {
@@ -67,7 +76,9 @@ public class ManifestValidator implements Validator {
} catch (Exception re) {
logger.debug("",re);
globalContext.addMessage(SdcCommon.MANIFEST_NAME, ErrorLevel.ERROR,
- Messages.INVALID_MANIFEST_FILE.getErrorMessage(),
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(ERROR_CODE_MNF_6,
+ Messages.INVALID_MANIFEST_FILE.getErrorMessage()),
LoggerTragetServiceName.VALIDATE_MANIFEST_CONTENT,
LoggerErrorDescription.INVALID_MANIFEST);
return;
@@ -77,14 +88,18 @@ public class ManifestValidator implements Validator {
manifestFiles.stream().filter(name ->
!globalContext.getFileContextMap().containsKey(name)
).forEach(name -> globalContext
- .addMessage(name, ErrorLevel.ERROR, Messages.MISSING_FILE_IN_ZIP.getErrorMessage(),
+ .addMessage(name, ErrorLevel.ERROR,ErrorMessagesFormatBuilder
+ .getErrorWithParameters(ERROR_CODE_MNF_4,
+ Messages.MISSING_FILE_IN_ZIP.getErrorMessage()),
LoggerTragetServiceName.VALIDATE_FILE_IN_ZIP, LoggerErrorDescription.MISSING_FILE));
globalContext.getFileContextMap().keySet().stream().filter(name ->
isNotManifestFiles(manifestFiles, name) && isNotManifestName(name)
).forEach(name ->
globalContext.addMessage(name, ErrorLevel.WARNING,
- Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage(),
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(ERROR_CODE_MNF_5,
+ Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage()),
LoggerTragetServiceName.VALIDATE_FILE_IN_MANIFEST, LoggerErrorDescription.MISSING_FILE)
);
@@ -107,7 +122,6 @@ public class ManifestValidator implements Validator {
mdcDataDebugMessage.debugEntryMessage(null, null);
ManifestScanner manifestScanner = new ManifestScanner();
- manifestScanner.init(context);
manifestScanner.scan(null, manifestContent.getData(), context);
mdcDataDebugMessage.debugExitMessage(null, null);
@@ -116,32 +130,18 @@ public class ManifestValidator implements Validator {
private class ManifestScanner {
- private GlobalValidationContext globalValidationContext;
- private List<String> fileList;
-
- public void init(GlobalValidationContext globalValidationContext) {
- this.globalValidationContext = globalValidationContext;
- this.fileList = new ArrayList<>();
- }
-
+ private List<String> fileList=new ArrayList<>();
public void scan(FileData fileData, List<FileData> data,
GlobalValidationContext globalContext) {
if (fileData == null) {
for (FileData childFileData : data) {
- if (childFileData.getType() != null
- && childFileData.getType().equals(FileData.Type.HEAT_ENV)) {
- globalContext.addMessage(childFileData.getFile(), ErrorLevel.ERROR,
- ErrorMessagesFormatBuilder
- .getErrorWithParameters(Messages.ENV_NOT_ASSOCIATED_TO_HEAT.getErrorMessage()),
- LoggerTragetServiceName.SCAN_MANIFEST_STRUCTURE,
- "env file is not associated to HEAT file");
- }
+ validateIfEnvIsAssociatedToHeat(globalContext, childFileData);
}
}
if (fileData != null) {
fileList.add(fileData.getFile());
- validateFileTypeVsFileName(fileData);
+ validateFileTypeVsFileName(globalContext,fileData);
}
if (data == null) {
return;
@@ -149,42 +149,76 @@ public class ManifestValidator implements Validator {
data.forEach(chileFileData -> scan(chileFileData, chileFileData.getData(), globalContext));
}
-
public List<String> getFileList() {
return this.fileList;
}
+ }
- private void validateFileTypeVsFileName(FileData fileData) {
- String fileName = fileData.getFile();
- if (fileName == null) {
- this.globalValidationContext.addMessage(SdcCommon.MANIFEST_NAME, ErrorLevel.ERROR,
- Messages.MISSING_FILE_NAME_IN_MANIFEST.getErrorMessage(),
- LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME, "Missing file name in manifest");
+ private void validateFileTypeVsFileName(GlobalValidationContext globalValidationContext,
+ FileData fileData) {
+ String fileName = fileData.getFile();
+ validateIfFileExists(globalValidationContext,fileName);
+ FileData.Type type = fileData.getType();
+ if (type == null) {
+ globalValidationContext.addMessage(fileName, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder.getErrorWithParameters(ERROR_CODE_MNF_8,
+ Messages.INVALID_FILE_TYPE.getErrorMessage()),
+ LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME, "Invalid file type");
+ } else if (type.equals(FileData.Type.HEAT_NET) || type.equals(FileData.Type.HEAT_VOL)
+ || type.equals(FileData.Type.HEAT)) {
+ validateIfFileHasYamlExtenstion(globalValidationContext,fileName);
+ } else if (type.equals(FileData.Type.HEAT_ENV)) {
+ validateIfFileHasEnvExtension(globalValidationContext,fileName);
+ }
+ }
- }
- FileData.Type type = fileData.getType();
- if (type == null) {
- this.globalValidationContext
- .addMessage(fileName, ErrorLevel.ERROR, Messages.INVALID_FILE_TYPE.getErrorMessage(),
- LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME, "Invalid file type");
- } else if (type.equals(FileData.Type.HEAT_NET) || type.equals(FileData.Type.HEAT_VOL)
- || type.equals(FileData.Type.HEAT)) {
- if (fileName != null && !fileName.endsWith(".yml") && !fileName.endsWith(".yaml")) {
- this.globalValidationContext.addMessage(fileName, ErrorLevel.ERROR,
- ErrorMessagesFormatBuilder
- .getErrorWithParameters(Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
- fileName), LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME,
- "Wrong HEAT file extention");
- }
- } else if (type.equals(FileData.Type.HEAT_ENV)) {
- if (fileName != null && !fileName.endsWith(".env")) {
- this.globalValidationContext.addMessage(fileName, ErrorLevel.ERROR,
- ErrorMessagesFormatBuilder
- .getErrorWithParameters(Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(),
- fileName), LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME,
- "Wrong env file extention");
- }
- }
+ private void validateIfFileHasEnvExtension(GlobalValidationContext globalValidationContext,
+ String fileName) {
+ if (fileName != null && !fileName.endsWith(".env")) {
+ globalValidationContext.addMessage(fileName, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(ERROR_CODE_MNF_3,
+ Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(),
+ fileName), LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME,
+ "Wrong env file extention");
+ }
+ }
+
+ private void validateIfFileHasYamlExtenstion(GlobalValidationContext globalValidationContext,
+ String fileName) {
+ if (fileName != null && !fileName.endsWith(".yml") && !fileName.endsWith(".yaml")) {
+ globalValidationContext.addMessage(fileName, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(ERROR_CODE_MNF_2,
+ Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
+ fileName), LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME,
+ "Wrong HEAT file extention");
+ }
+ }
+
+ private void validateIfFileExists(GlobalValidationContext globalValidationContext,
+ String fileName) {
+ if (fileName == null) {
+ globalValidationContext.addMessage(SdcCommon.MANIFEST_NAME, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(ERROR_CODE_MNF_7,
+ Messages.MISSING_FILE_NAME_IN_MANIFEST.getErrorMessage()),
+ LoggerTragetServiceName.VALIDATE_FILE_TYPE_AND_NAME,
+ "Missing file name in manifest");
+
+ }
+ }
+
+ private void validateIfEnvIsAssociatedToHeat(GlobalValidationContext globalContext,
+ FileData childFileData) {
+ if (childFileData.getType() != null
+ && childFileData.getType().equals(FileData.Type.HEAT_ENV)) {
+ globalContext.addMessage(childFileData.getFile(), ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(ERROR_CODE_MNF_1,
+ Messages.ENV_NOT_ASSOCIATED_TO_HEAT.getErrorMessage()),
+ LoggerTragetServiceName.SCAN_MANIFEST_STRUCTURE,
+ "env file is not associated to HEAT file");
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java
index 3d560934dd..391eb633ac 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/ManifestValidatorTest.java
@@ -34,13 +34,14 @@ import java.util.Map;
public class ManifestValidatorTest {
+ private static final String RESOURCE_PATH = "/org/openecomp/validation/validators/manifestValidator";
private ManifestValidator validator = new ManifestValidator();
@Test
public void testValidManifest() {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator,
- "/org/openecomp/validation/validators/manifestValidator/validFiles");
+ RESOURCE_PATH + "/validFiles");
Assert.assertNotNull(messages);
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 0);
@@ -49,44 +50,54 @@ public class ManifestValidatorTest {
@Test
public void testManifestMissingFileInZip() {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(),
- "/org/openecomp/validation/validators/manifestValidator/missingFileInZip");
+ RESOURCE_PATH + "/missingFileInZip");
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 1);
Assert.assertTrue(messages.containsKey("singleVol.yaml"));
- ValidationTestUtil.validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(),
- "ERROR: " + Messages.MISSING_FILE_IN_ZIP.getErrorMessage());
+ ValidationTestUtil.validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList()
+ .get(0).getMessage(),
+ "ERROR: " + "[MNF4]: " + Messages.MISSING_FILE_IN_ZIP.getErrorMessage());
}
@Test
public void testInvalidManifest() {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(),
- "/org/openecomp/validation/validators/manifestValidator/invalidManifest");
+ RESOURCE_PATH + "/invalidManifest");
Assert.assertNotNull(messages);
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 1);
Assert.assertTrue(messages.containsKey(SdcCommon.MANIFEST_NAME));
ValidationTestUtil.validateErrorMessage(
messages.get(SdcCommon.MANIFEST_NAME).getErrorMessageList().get(0).getMessage(),
- "ERROR: " + Messages.INVALID_MANIFEST_FILE.getErrorMessage(), SdcCommon.MANIFEST_NAME);
+ "ERROR: " +"[MNF6]: " + Messages.INVALID_MANIFEST_FILE.getErrorMessage());
}
@Test
public void testMissingFileInManifest() {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(),
- "/org/openecomp/validation/validators/manifestValidator/missingFileInManifest");
+ RESOURCE_PATH + "/missingFileInManifest");
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 1);
Assert.assertTrue(messages.containsKey("extraFile.env"));
- ValidationTestUtil.validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(),
- "WARNING: " + Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage());
+ ValidationTestUtil.validateErrorMessage(messages.get("extraFile.env").getErrorMessageList()
+ .get(0).getMessage(),
+ "WARNING: " + "[MNF5]: " + Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage());
}
+ @Test
+ public void testMissingFileTypeInManifest() {
+ Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(),
+ RESOURCE_PATH + "/missingFileTypeInManifest");
+ ValidationTestUtil.validateErrorMessage(
+ messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(),
+ "ERROR: " + "[MNF7]: Missing file name in manifest");
+ }
@Test
public void testInvalidFileTypeInManifest() {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(),
- "/org/openecomp/validation/validators/manifestValidator/invalidFileTypeInManifest");
+ RESOURCE_PATH + "/invalidFileTypeInManifest");
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 4);
Assert.assertTrue(messages.containsKey("single.env.illegalSuffix"));
@@ -95,18 +106,19 @@ public class ManifestValidatorTest {
Assert.assertTrue(messages.containsKey("singleVol.yaml.illegalSuffix"));
ValidationTestUtil.validateErrorMessage(
messages.get("single.env.illegalSuffix").getErrorMessageList().get(0).getMessage(),
- "ERROR: " + Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(),
+ "ERROR: "+"[MNF3]: " + Messages.WRONG_ENV_FILE_EXTENSION.getErrorMessage(),
"single.env.illegalSuffix");
ValidationTestUtil.validateErrorMessage(
messages.get("illegalTypeFile.yaml").getErrorMessageList().get(0).getMessage(),
- "ERROR: " + Messages.INVALID_FILE_TYPE.getErrorMessage(), "illegalTypeFile.yaml");
+ "ERROR: "+"[MNF8]: " + Messages.INVALID_FILE_TYPE.getErrorMessage(),
+ "illegalTypeFile.yaml");
ValidationTestUtil.validateErrorMessage(
messages.get("single.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(),
- "ERROR: " + Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
+ "ERROR: "+"[MNF2]: " + Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
"single.yaml.illegalSuffix");
ValidationTestUtil.validateErrorMessage(
messages.get("singleVol.yaml.illegalSuffix").getErrorMessageList().get(0).getMessage(),
- "ERROR: " + Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
+ "ERROR: "+"[MNF2]: " + Messages.WRONG_HEAT_FILE_EXTENSION.getErrorMessage(),
"singleVol.yaml.illegalSuffix");
}
@@ -116,27 +128,29 @@ public class ManifestValidatorTest {
public void testMissingFileInManifestAndInZip() {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(),
- "/org/openecomp/validation/validators/manifestValidator/missingFileInManifestAndInZip");
+ RESOURCE_PATH + "/missingFileInManifestAndInZip");
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 2);
Assert.assertTrue(messages.containsKey("extraFile.env"));
Assert.assertTrue(messages.containsKey("singleVol.yaml"));
- ValidationTestUtil.validateErrorMessage(messages.get("extraFile.env").getErrorMessageList().get(0).getMessage(),
- "WARNING: " + Messages.MISSING_FILE_IN_MANIFEST.getErrorMessage());
- ValidationTestUtil.validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList().get(0).getMessage(),
- "ERROR: " + Messages.MISSING_FILE_IN_ZIP.getErrorMessage());
+ ValidationTestUtil.validateErrorMessage(messages.get("extraFile.env").getErrorMessageList()
+ .get(0).getMessage(), "WARNING: " + "[MNF5]: "+ Messages.MISSING_FILE_IN_MANIFEST
+ .getErrorMessage());
+ ValidationTestUtil.validateErrorMessage(messages.get("singleVol.yaml").getErrorMessageList()
+ .get(0).getMessage(), "ERROR: " + "[MNF4]: " + Messages.MISSING_FILE_IN_ZIP
+ .getErrorMessage());
}
-
@Test
public void testEnvInRoot() {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new ManifestValidator(),
- "/org/openecomp/validation/validators/manifestValidator/envInRoot");
+ RESOURCE_PATH + "/envInRoot");
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 1);
Assert.assertTrue(messages.containsKey("second.env"));
- ValidationTestUtil.validateErrorMessage(messages.get("second.env").getErrorMessageList().get(0).getMessage(),
- "ERROR: ENV file must be associated to a HEAT file");
+ ValidationTestUtil.validateErrorMessage(messages.get("second.env").getErrorMessageList()
+ .get(0).getMessage(),
+ "ERROR: [MNF1]: ENV file must be associated to a HEAT file");
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/MANIFEST.json
new file mode 100644
index 0000000000..ce7f17dbae
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/MANIFEST.json
@@ -0,0 +1,23 @@
+{
+ "name": "validTest",
+ "description": "Valid Test",
+ "version": "1610",
+ "data": [
+ {
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "single.env.illegalSuffix",
+ "type": "HEAT_ENV"
+ },
+ {
+ "file": "singleVol.yaml.illegalSuffix",
+ "type": "HEAT_VOL"
+ }
+ ]
+ },{
+ "file": "illegalTypeFile.yaml",
+ "type": "ILLEGAL_TYPE"
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/illegalTypeFile.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/illegalTypeFile.yaml
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/illegalTypeFile.yaml
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.env.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.env.illegalSuffix
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.env.illegalSuffix
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.yaml.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.yaml.illegalSuffix
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/single.yaml.illegalSuffix
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/singleVol.yaml.illegalSuffix b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/singleVol.yaml.illegalSuffix
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/manifestValidator/missingFileTypeInManifest/singleVol.yaml.illegalSuffix