From be8d4fac153435674ce0c5cb29773ba4d4d36d16 Mon Sep 17 00:00:00 2001 From: "Baumel, Dvir (db384r)" Date: Mon, 16 Mar 2020 13:36:02 +0200 Subject: Base template guidelines changes Issue-ID: SDC-2822 Change-Id: Ieb1832f878e2268bcfbfb2d574f8c7371f14b191 Signed-off-by: Baumel, Dvir (db384r) --- .../impl/validators/SharedResourceGuideLineValidator.java | 6 +++--- .../impl/validators/SharedResourceGuideLineValidatorTest.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl') diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java index 9be5f61f25..0c279c23ee 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidator.java @@ -60,7 +60,7 @@ public class SharedResourceGuideLineValidator implements Validator { return; } - Set baseFiles = validateManifest(manifestContent, globalContext); + Set baseFiles = validateManifest(manifestContent, globalContext); Map fileTypeMap = ManifestUtil.getFileTypeMap(manifestContent); globalContext.getFiles().stream() @@ -78,7 +78,7 @@ public class SharedResourceGuideLineValidator implements Validator { if (baseFiles == null || baseFiles.isEmpty()) { globalContext.addMessage( SdcCommon.MANIFEST_NAME, - ErrorLevel.WARNING, + ErrorLevel.ERROR, ErrorMessagesFormatBuilder .getErrorWithParameters(ERROR_CODE_SRG_3,Messages .MISSIN_BASE_HEAT_FILE.getErrorMessage())); @@ -86,7 +86,7 @@ public class SharedResourceGuideLineValidator implements Validator { String baseFileList = getElementListAsString(baseFiles); globalContext.addMessage( SdcCommon.MANIFEST_NAME, - ErrorLevel.WARNING, + ErrorLevel.ERROR, ErrorMessagesFormatBuilder .getErrorWithParameters(ERROR_CODE_SRG_4,Messages .MULTI_BASE_HEAT_FILE.getErrorMessage(), diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidatorTest.java index 5c97b63bdd..dde43e7808 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidatorTest.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/SharedResourceGuideLineValidatorTest.java @@ -180,7 +180,7 @@ public class SharedResourceGuideLineValidatorTest { Assert.assertEquals(messages.size(), 1); Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1); Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(), - "WARNING: [SRG3]: Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"); + "ERROR: [SRG3]: Missing Base HEAT. Pay attention that without Base HEAT, there will be no shared resources"); } @Test @@ -191,6 +191,6 @@ public class SharedResourceGuideLineValidatorTest { Assert.assertEquals(messages.size(), 1); Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().size(), 1); Assert.assertEquals(messages.get("MANIFEST.json").getErrorMessageList().get(0).getMessage(), - "WARNING: [SRG4]: Multi Base HEAT. Expected only one. Files [second.yaml,first.yaml]."); + "ERROR: [SRG4]: Multi Base HEAT. Expected only one. Files [second.yaml,first.yaml]."); } } -- cgit 1.2.3-korg