summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSara Weiss <sara.weiss@intl.att.com>2019-09-03 10:59:46 +0300
committerWeiss, Sara (sw793d) <sara.weiss@intl.att.com>2019-09-03 13:19:48 +0300
commit385a51ea728c998d6f7867caf3989fa751de9087 (patch)
tree6914c3bac20b144fae87e047630529ccd0c7ea3c
parent1b0d4c6a981f35a7fdf6a969aad483c871af4292 (diff)
Add UT to ToscaParserImpl
Issue-ID: VID-378 Signed-off-by: Sara Weiss <sara.weiss@intl.att.com> Change-Id: If2cf3bd2171b7935702008f7a16fbea1b8523a35
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
index aeb010071..10f272a36 100644
--- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
+++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
@@ -127,6 +127,19 @@ public class ToscaParserImpl2Test {
assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedService), om.writeValueAsString(actualService));
}
+
+ @Test
+ public void testScalingPolicyOfGroup() throws AsdcCatalogException, SdcToscaParserException {
+ String vnfGroupingUuid = "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc";
+ ISdcCsarHelper sdcCsarHelper = toscaParserImpl2.getSdcCsarHelper(getCsarPath(vnfGroupingUuid));
+ Map<String, Integer> policiesTargets = toscaParserImpl2.extractScalingPolicyOfGroup(sdcCsarHelper);
+
+ assertThat(policiesTargets, is(ImmutableMap.of(
+ "vdorothea_svc_vprs_proxy 0", 2,
+ "groupingservicefortest..ResourceInstanceGroup..1", 3
+ )));
+ }
+
@Test(dataProvider = "expectedServiceModel")
public void assertEqualBetweenObjects(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
final Path csarPath = getCsarPath(mockHelper.getUuid());