From e7b02c6027fec763ce1793abb0983ecfcee7f6e1 Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Sun, 1 Sep 2019 14:39:35 +0300 Subject: Fix "old-csars" test: csarWithVnfWithVfModuleInModel Issue-ID: VID-378 Change-Id: Icde5058772379f2d48477c05c986f4fe8a30f446 Signed-off-by: Eylon Malin Signed-off-by: Ittay Stern --- .../onap/vid/asdc/parser/ToscaParserImpl2Test.java | 19 +++++++++---------- .../resources/csars/service-MnsVnn1bDmzSvc-csar.csar | Bin 9042 -> 0 bytes .../resources/csars/service-MnsVnn1bDmzSvc-csar.zip | Bin 0 -> 6499 bytes .../resources/csars/service-MnsVnn1bExnSvc-csar.csar | Bin 8913 -> 0 bytes .../resources/csars/service-MnsVnn1bExnSvc-csar.zip | Bin 0 -> 6378 bytes vid-app-common/src/test/resources/sdcservices.json | 6 +++--- 6 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.csar create mode 100644 vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.zip delete mode 100644 vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.csar create mode 100644 vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.zip 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 Binary files a/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.csar and /dev/null 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 Binary files /dev/null and b/vid-app-common/src/test/resources/csars/service-MnsVnn1bDmzSvc-csar.zip 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 Binary files a/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.csar and /dev/null 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 Binary files /dev/null and b/vid-app-common/src/test/resources/csars/service-MnsVnn1bExnSvc-csar.zip 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 +} -- cgit 1.2.3-korg