1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
3 import org.junit.Before;
5 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
7 import java.io.IOException;
9 public class UnifiedCompositionNestedPatternsFullTest extends BaseFullTranslationTest {
13 public void setUp() throws IOException {
14 // do not delete this function. it prevents the superclass setup from running
18 public void testNestedWithOneLevelMultipleComputesSingleSubstitution() throws IOException {
20 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedSingleSubstitution1B/in";
22 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedSingleSubstitution1B/out";
24 testTranslationWithInit();
28 public void testNestedWithOneLevelMultipleComputesScalingInstance() throws IOException {
30 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedScalingInstance/in";
32 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedScalingInstance/out";
34 testTranslationWithInit();
38 public void testNestedWithOneLevelMultipleComputesCatalogInstance() throws IOException {
40 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedCatalogInstance/in";
42 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedCatalogInstance/out";
44 testTranslationWithInit();
48 public void testNestedWithOneLevelAllNonNestedPatterns() throws IOException {
50 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedAllNonNestedPatterns/in";
52 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedAllNonNestedPatterns/out";
54 testTranslationWithInit();
58 public void testNestedWithOneLevelNoCompute() throws IOException {
60 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedNoCompute/in";
62 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedNoCompute/out";
64 testTranslationWithInit();
68 public void testNestedWithOneLevelOtherPatternsNoComputeWithConnectivity() throws IOException {
69 //One nested resource with no Compute, one nested resource having all non nested patterns
70 // with connectivity between themo
72 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedAllPatternsConnectivity/in";
74 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedAllPatternsConnectivity/out";
76 testTranslationWithInit();
80 public void testNestedWithOneLevelTwoSameFileOneOtherAllPattern1B() throws IOException {
81 // Heat file with 3 nested resources, while 2 point to the same nested heat file, and all
82 // nested heat file including pattern 1B.
84 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedTwoSameFileOneDiff/in";
86 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedTwoSameFileOneDiff/out";
88 testTranslationWithInit();
92 public void testNestedWithOneLevelTwoSameFileOneOtherAllPattern1BWithConnectivity() throws
94 // Heat file with 3 nested resources, while 2 point to the same nested heat file, and all
95 // nested heat file including pattern 1B. + conectivity between all nested resources
97 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedTwoSameOneDiffWithConnectivity/in";
99 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/oneLevel/nestedTwoSameOneDiffWithConnectivity/out";
101 testTranslationWithInit();
104 //**************** NESTED MULTI-LEVEL TESTS ******************************
107 public void testNestedMultiLevelPortSecurityGroupNetworkPattern1B() throws
109 // heat file - 1 nested resource + security group which will be connected to port in ALL
110 // nested levels, network which will be connected from port in ALL nested level.
111 //nested heat level 1 - 1 nested resource + pattern 1B
112 //nested heat level 2 - 1 nested resource + pattern 1B
114 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/portSecurityGroupNetPattern1B/in";
116 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/portSecurityGroupNetPattern1B/out";
118 testTranslationWithInit();
122 public void testNestedMultiLevelAllPatternsDependsOnConnectivity() throws
125 HEAT FILE - 1 : nested resource to heat without nova in the nested heat + 1 nested
126 resource + pattern 1B + pattern C1 + pattern 4 + connectivity between them all (using
127 depends on from/to the first nested resource, without nova)
129 NESTED HEAT LEVEL 1 - 1 nested resource + pattern 1B + pattern C1 + pattern 4 +
130 connectivity between them all (VM Types same as Main)
132 NESTED HEAT LEVEL 2 - 1 nested resource + pattern 1B + pattern C1 + pattern 4 +
133 connectivity between them all
137 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/allPatternsDependsOnConnectivity/in";
139 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/allPatternsDependsOnConnectivity/out";
141 testTranslationWithInit();
145 public void testThreeNestedLevelsDiffVmTypePattern1B() throws IOException {
147 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/threeNestedLevelsDiffVmTypePattern1B/in";
149 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/threeNestedLevelsDiffVmTypePattern1B/out";
151 testTranslationWithInit();
155 public void testThreeNestedLevelsSameVmTypePattern1B() throws IOException {
157 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/threeNestedLevelsSameVmTypePattern1B/in";
159 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/threeNestedLevelsSameVmTypePattern1B/out";
161 testTranslationWithInit();
165 public void testTwoNestedLevelsWithAllPatternsAndConnectionsBetweenThem() throws IOException {
167 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/twoNestedLevelsWithAllPatternsAndConnectivities/in";
169 "/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/twoNestedLevelsWithAllPatternsAndConnectivities/out";
171 testTranslationWithInit();