diff options
author | siddharth0905 <siddharth.singh4@amdocs.com> | 2018-03-15 18:14:57 +0530 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-03-19 08:39:30 +0000 |
commit | 3c24190cca30ee77c8c81d1738d7d5cbf454d647 (patch) | |
tree | 1cbf8d9b96f58dd9467dd67cb5e2b0fac2ce3919 /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp | |
parent | d03d20a800a41dc04e70803ae2c6851bfb9948b9 (diff) |
Code Change & Junit for verifying Pattern5
Code change and Junit for pattern5
Change-Id: Icbe8cf25cd97250e8c5000ca75bc7dcd7900e129
Issue-ID: SDC-1085
Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp')
1 files changed, 100 insertions, 0 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/fulltest/UnifiedCompositionSubInterfaceFullTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java index 860df69927..d27eb20242 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java @@ -29,6 +29,8 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1b/"; private static final String PATTERN_1C1_BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1c1/"; + private static final String PATTERN_5_BASE_DIRECTORY = + "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/"; private static final String PATTERN_4_BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern4/"; @@ -246,6 +248,104 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT testTranslationWithInit(PATTERN_1C1_BASE_DIRECTORY + "allConnectivities"); } + //Pattern5 Test Cases + @Test + public void testBaseScenarioPattern5() throws IOException { + /** + * Base heat has only nested component and nested heat has reference to subinterface and + * two VFCs of different type + * 1. Each server connected with two port + * 2. One Port of each server connected to network + * 3. Only one port out of four is having sub interface connectivity + * 4. Sub-interface connected to different network then port + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "baseScenario"); + } + + @Test + public void testComplexVFCScalingScenarioPattern5() throws IOException { + /** + * 1. Base heat has only nested component and nested has reference to subinterface and + * two VFCs of same type + * 1. Each server connected with two port + * 2. One Port of each server connected to network + * 3. Only one port out of four is having sub interface + * 4. Sub-interface connected to different network then port + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCScalingScenario"); + } + + @Test + public void testComplexVFCMultiLevelNestedScenarioPattern5() throws IOException { + /** + * 1. First level nested is having one VFC and one Port with Sub interface + * 2. Second level nested is having one VFC and one Port with Sub interface which are of same + * type as parent heat file + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCMultiLevelNestedScenario"); + } + + @Test + public void testComplexVFCMultiLevelNestedDiffComputeScenarioPattern5() throws + IOException { + /** + * 1. First level nested is having one VFC and one Port with Sub interface + * 2. Second level nested is having one VFC and one Port with Sub interface which are of + * different type as parent heat file + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + + "complexVFCMultiLevelNestedDiffComputeScenario"); + } + + @Test + public void testComplexVFCMultiComputeInAllHeatPattern5() throws + IOException { + /** + * 1. Main is having 4 VFC of 2 type and 2 port and all having sub interface + * 2. Second level nested is having 4 VFC of 2 type and 2 port and all having sub interface + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + + "complexVFCMultiVFCInAllHeatScalingScenario"); + } + + @Test + public void testComplexVFCMultiLevelNestedMultiComputeScenarioPattern5() throws + IOException { + /** + * 1. First level nested is having one VFC and one Port with Sub interface + * 2. Second level nested is having two VFC of same type and two Port with Sub interface + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + + "complexVFCMultiLevelNestedMultiComputeScenario"); + } + + @Test + public void testComplexVFCWithDiffSubInfConnectivityScenarioPattern5() + throws + IOException { + /* + * 1. First level nested is having one VFC and one Port with Sub interface + * 2. Second level nested is having two VFC of same type and one Port with only one port + * connected to Sub interface + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + + "complexVFCWithDiffSubInfConnectivityScenario"); + } + + //Catalog instance will start working with 1C2 changes in place + @Test + public void testComplexVFCWithDiffSubInfCountScenarioPattern5() + throws + IOException { + /* + * 1. First level nested is having one VFC and one Port with Sub interface + * 2. Second level nested is having two VFC of same type and connected to Sub interface but + * having different count + */ + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + + "complexVFCWithDiffSubInfCountScenario"); + } + //Pattern 4 Test Cases @Test public void testSubInterfaceComputePortNetworkPattern4() throws IOException { |