diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org')
1 files changed, 13 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java index 26aad3cdf8..759b376b97 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java @@ -73,9 +73,21 @@ public class NovaServerNamingConventionGuideLineValidatorTest { } @Test - public void testNovaImageAndFlavorNames() { + public void testNovaImageAndFlavorNamesEmptyProperties() { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), + PATH + "heatNovaServerImageAndFlavor/negativeEmptyProperties"); + Assert.assertNotNull(messages); + Assert.assertEquals(1, messages.size()); + Assert.assertEquals(1, messages.get("first.yaml").getErrorMessageList().size()); + Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(), + "WARNING: [NNS13]: Server 'image' Parameter Name not aligned with Guidelines, Parameter Name [fsb2-image], Resource ID [FSB3]. As a result, VF/VFC Profile may miss this information"); + } + + @Test + public void testNovaImageAndFlavorNames() { + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator, + resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(), PATH + "heatNovaServerImageAndFlavor/positive"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 0); |