aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-09-01 14:39:35 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-01 18:12:44 +0300
commite7b02c6027fec763ce1793abb0983ecfcee7f6e1 (patch)
treeb785a6be5993038232387338b122897a3741e5bc /vid-app-common/src/test
parentccf611730b91fe10f60633c3aeb604ea993e61b0 (diff)
Fix "old-csars" test: csarWithVnfWithVfModuleInModel
Issue-ID: VID-378 Change-Id: Icde5058772379f2d48477c05c986f4fe8a30f446 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/test')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java19
-rw-r--r--vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.csarbin9042 -> 0 bytes
-rw-r--r--vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.zipbin0 -> 6499 bytes
-rw-r--r--vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.csarbin8913 -> 0 bytes
-rw-r--r--vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.zipbin0 -> 6378 bytes
-rw-r--r--vid-app-common/src/test/resources/sdcservices.json6
6 files changed, 12 insertions, 13 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 e25834bd6..aeb010071 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
@@ -32,7 +32,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.onap.vid.asdc.parser.ToscaParserImpl2.Constants.ECOMP_GENERATED_NAMING_PROPERTY;
import static org.onap.vid.testUtils.TestUtils.assertJsonStringEqualsIgnoreNulls;
-import static org.onap.vid.testUtils.TestUtils.testWithSystemProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -286,15 +285,15 @@ public class ToscaParserImpl2Test {
@Test(dataProvider = "oldCsarUuid")
public void csarWithVnfWithVfModuleInModel(String oldCsarUuid, String vnfName) throws Exception {
- testWithSystemProperty("asdc.model.namespace", "com.att.d2.", ()-> {
- ToscaParser tosca = new ToscaParserImpl();
- final UUID uuid = UUID.fromString(oldCsarUuid);
- final ServiceModel serviceModel = tosca.makeServiceModel(oldCsarUuid, asdcClient.getServiceToscaModel(uuid), asdcClient.getService(uuid));
- assertThat(serviceModel.getVnfs(), aMapWithSize(1));
- assertThat(serviceModel.getVfModules(), aMapWithSize(2));
- assertThat(serviceModel.getVolumeGroups(), aMapWithSize(0));
- assertThat(serviceModel.getVnfs().get(vnfName).getVfModules(), aMapWithSize(2));
- });
+ ToscaParser tosca = new ToscaParserImpl();
+ final UUID uuid = UUID.fromString(oldCsarUuid);
+ final ServiceModel serviceModel = tosca.makeServiceModel(
+ oldCsarUuid, asdcClient.getServiceToscaModel(uuid), asdcClient.getService(uuid)
+ );
+ assertThat(serviceModel.getVnfs(), aMapWithSize(1));
+ assertThat(serviceModel.getVfModules(), aMapWithSize(2));
+ assertThat(serviceModel.getVolumeGroups(), aMapWithSize(0));
+ assertThat(serviceModel.getVnfs().get(vnfName).getVfModules(), aMapWithSize(2));
}
@Test
diff --git a/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.csar b/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.csar
deleted file mode 100644
index b7b011a07..000000000
--- a/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.csar
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.zip b/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.zip
new file mode 100644
index 000000000..a07d45241
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.csar b/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.csar
deleted file mode 100644
index c680bc47f..000000000
--- a/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.csar
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.zip b/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.zip
new file mode 100644
index 000000000..2b8ebe86a
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/sdcservices.json b/vid-app-common/src/test/resources/sdcservices.json
index 1ba13c9ae..e9ef2a85a 100644
--- a/vid-app-common/src/test/resources/sdcservices.json
+++ b/vid-app-common/src/test/resources/sdcservices.json
@@ -229,7 +229,7 @@
"invariantUUID": "16972715-9d79-4fb0-9463-0253d45e1d48",
"name": "MNS VNN1B exn svc",
"version": "1.0",
- "toscaModelURL": "./csars/service-MnsVnn1bExnSvc-csar.csar",
+ "toscaModelURL": "./csars/service-MnsVnn1bExnSvc-csar.zip",
"category": "Emanuel",
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "rg276b",
@@ -243,7 +243,7 @@
"invariantUUID": "4e099102-fccb-4ee3-b51b-ebb51259dc50",
"name": "MNS VNN1B dmz svc",
"version": "1.0",
- "toscaModelURL": "./csars/service-MnsVnn1bDmzSvc-csar.csar",
+ "toscaModelURL": "./csars/service-MnsVnn1bDmzSvc-csar.zip",
"category": "Emanuel",
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "rg276b",
@@ -281,4 +281,4 @@
"resources": null
}
]
-} \ No newline at end of file
+}