diff options
author | 2018-08-08 17:47:32 +0300 | |
---|---|---|
committer | 2018-08-12 07:19:36 +0000 | |
commit | aa7e0f9134195fe89bb96b3971d7821df217ff32 (patch) | |
tree | ce20341ba1a32c839765bf5dfb072bb169a365ff /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp | |
parent | c15ef65197789965734fb3aa90e9ea50bda05045 (diff) |
SRIOV for SDNF
Adding Fabric Configuration capability to the VFC/ compute
Change-Id: Ia518c56b75ec5355af94c28ac0b6bcfe11bc0d1e
Issue-ID: SDC-1601
Signed-off-by: Shnaider, Marina (ms7589) <ms7589@intl.att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java | 2 | ||||
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNovaServerImplTest.java (renamed from openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNovaServerTest.java) | 57 |
2 files changed, 55 insertions, 4 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java index 36f3b16056..b3ea6319b2 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java @@ -121,7 +121,7 @@ public class BaseResourceTranslationTest { "Error in validation " + TestUtils.getErrorAsString(translatorOutput.getErrorMessages())) .withId("Validation Error").withCategory(ErrorCategory.APPLICATION).build()); } - + return new ToscaFileOutputServiceCsarImpl().createOutputFile(translatorOutput.getToscaServiceModel(), null); } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNovaServerTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNovaServerImplTest.java index 9743483d42..6e1653137a 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/resources/OSNovaServerTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNovaServerImplTest.java @@ -18,19 +18,18 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdc.translator.impl.heattotosca.resources; +package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation; import org.junit.Before; import org.junit.Test; import org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.ConsolidationDataValidationType; -import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseResourceTranslationTest; import java.io.IOException; import static org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.TestConstants.TEST_PORT_POSITIVE; import static org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.TestConstants.TEST_VOLUME_POSITIVE; -public class OSNovaServerTest extends BaseResourceTranslationTest { +public class ResourceTranslationNovaServerImplTest extends BaseResourceTranslationTest { @Override @Before @@ -59,4 +58,56 @@ public class OSNovaServerTest extends BaseResourceTranslationTest { validateComputeTemplateConsolidationData(ConsolidationDataValidationType.VALIDATE_PORT, TEST_PORT_POSITIVE); } + + @Test + public void testFabricConfigurationOnlyOnePortTrue() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfigurationAllFalse() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfigurationPropertyNull() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfigurationWithoutProperty() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfiguration2Ports() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + } |