aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-09-04 02:15:12 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-04 02:15:12 +0000
commit743eea07a01b475f6c116343d8bae80699ab4c1d (patch)
tree0ad91638c663dbee016493e69a8e2793093d8c48
parent91d3f65455177e10eb22d639afcc00cde6ad90a2 (diff)
parent385a51ea728c998d6f7867caf3989fa751de9087 (diff)
Merge "Add UT to ToscaParserImpl"
-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());