diff options
author | 2018-12-12 17:47:01 +0200 | |
---|---|---|
committer | 2018-12-13 12:03:24 +0200 | |
commit | a15d4951fe5f3aa243ceed45d3250f8fe722143b (patch) | |
tree | 7cd3dcdf12b6048890af50a2570445cfb665c1ab /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org | |
parent | f1890525b78f5f1f4e47e496f11ec51bf5f69d36 (diff) |
Fabric configuration change
Change-Id: I584bbce2bdd45c6873ca3ed3b8b8820530d4804b
Issue-ID: SDC-1998
Signed-off-by: Manzon, Inna (im453s) <im453s@intl.att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org')
1 files changed, 116 insertions, 18 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/ResourceTranslationNovaServerImplTest.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 44a0e20363..b268bc2455 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNovaServerImplTest.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 @@ -71,51 +71,101 @@ public class ResourceTranslationNovaServerImplTest extends BaseResourceTranslati } @Test - public void testFabricConfigurationOnlyOnePortTrue() throws IOException { + public void testFabricConfigurationOnlyOnePortTrueAttrFlag() throws IOException { inputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/input"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/attr_flag/input"; outputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/output"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/attr_flag/output"; initTranslatorAndTranslate(); testTranslation(); } + + @Test + public void testFabricConfigurationOnlyOnePortTrueBindingProfile() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/binding_profile/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/one_port_true/binding_profile/output"; + initTranslatorAndTranslate(); + testTranslation(); + } @Test - public void testFabricConfigurationAllFalse() throws IOException { + public void testFabricConfigurationAllFalseAttrFlag() throws IOException { inputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/input"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/attr_flag/input"; outputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/output"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/attr_flag/output"; initTranslatorAndTranslate(); testTranslation(); } + + @Test + public void testFabricConfigurationAllFalseBindingProfile() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/binding_profile/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/all_false/binding_profile/output"; + initTranslatorAndTranslate(); + testTranslation(); + } @Test - public void testFabricConfigurationPropertyNull() throws IOException { + public void testFabricConfigurationPropertyNullAttrFlag() throws IOException { inputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/input"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/attr_flag/input"; outputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/output"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/attr_flag/output"; initTranslatorAndTranslate(); testTranslation(); } + + @Test + public void testFabricConfigurationPropertyNullBindingProfile() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/binding_profile/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/property_null/binding_profile/output"; + initTranslatorAndTranslate(); + testTranslation(); + } @Test - public void testFabricConfigurationWithoutProperty() throws IOException { + public void testFabricConfigurationWithoutPropertyAttrFlag() throws IOException { inputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/input"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/attr_flag/input"; outputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/output"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/attr_flag/output"; initTranslatorAndTranslate(); testTranslation(); } - + + @Test + public void testFabricConfigurationWithoutPropertyBindingProfile() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/binding_profile/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/without_property/binding_profile/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfiguration2PortsAttrFlag() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/attr_flag/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/attr_flag/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + @Test - public void testFabricConfiguration2Ports() throws IOException { + public void testFabricConfiguration2PortsWithBindingProfile() throws IOException { inputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/input"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/binding_profile/input"; outputFilesPath = - "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/output"; + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/2ports/binding_profile/output"; initTranslatorAndTranslate(); testTranslation(); } @@ -128,6 +178,54 @@ public class ResourceTranslationNovaServerImplTest extends BaseResourceTranslati TestFeatureManagerProvider.setFeatureManager(null); } - - + @Test + public void testFabricConfigurationMixedBothPropertiesTrue() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_both_properties_true/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_both_properties_true/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfigurationMixedOnePropertyTrue() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_one_property_true/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_one_property_true/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfigurationMixedBothPropertiesFalse() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_both_properties_false/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_both_properties_false/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfigurationMixedBindingProfileIsNotMap() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_binding_profile_is_not_map/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_binding_profile_is_not_map/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + + @Test + public void testFabricConfigurationMixedBindingProfileIsNull() throws IOException { + inputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_binding_profile_is_null/input"; + outputFilesPath = + "/mock/services/heattotosca/novaservertranslation/fabricConfiguration/mixed_binding_profile_is_null/output"; + initTranslatorAndTranslate(); + testTranslation(); + } + } |