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;
@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
"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",
"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",
"resources": null
}
]
-}
\ No newline at end of file
+}