summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@att.com>2021-02-05 20:34:11 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2021-02-16 15:45:44 -0500
commitd5968f56b382c50dfafc3b6feeccf5b81d176b9d (patch)
treefb84f73c534afa746fb4eaefb247c0c096b8b7a3 /adapters/mso-adapter-utils/src
parent666b56c9241c37b22f631fb88f4a40aedefa2eac (diff)
update camunda and spring to latest versions
Updated camunda to 7.14 and updated spring boot camunda to 3.4 Started to clean up duplicate maven dependencies Issue-ID: SO-3521 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: Ic65b04772b91dd989e41d6b6b93872978bc4e4e2
Diffstat (limited to 'adapters/mso-adapter-utils/src')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java2
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java1
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java3
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java6
4 files changed, 5 insertions, 7 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
index 1df5fe36ab..be42ff10bb 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
@@ -212,7 +212,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
if (response.hasEntity()) {
multicloudResponseBody = getCreateBody((java.io.InputStream) response.getEntity());
}
- if (response.getStatus() == Response.Status.CREATED.getStatusCode() && response.hasEntity()) {
+ if (response.getStatus() == Response.Status.CREATED.getStatusCode() && multicloudResponseBody != null) {
String canonicalName = stackName + "/";
if (multicloudResponseBody != null) {
canonicalName = canonicalName + multicloudResponseBody.getWorkloadId();
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
index f20f6f1448..5ee4987e38 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
@@ -439,6 +439,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
String requestId = getRequestId();
doReturn(heatClient).when(heatUtils).getHeatClient(cloudSiteId, tenantId);
+ doNothing().when(heatUtils).saveStackRequest(eq(createStackParam), isNull(), eq("stackName"));
doReturn(stackResource).when(heatClient).getStacks();
doReturn(mockCreateStack).when(stackResource).create(createStackParam);
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
index acd42dd8da..c6111a16cb 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
@@ -95,7 +95,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null);
expectedStackInfo.setCanonicalName("stackName/id");
- doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class));
doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class));
doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class));
doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class));
@@ -120,7 +119,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null);
expectedStackInfo.setCanonicalName("stackName/id");
- doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class));
doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class));
doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class));
@@ -147,7 +145,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null);
expectedStackInfo.setCanonicalName("stackName/id");
- doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class));
doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class));
doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class));
doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class));
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
index 44a9bc3e10..7adfe091d3 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
@@ -181,12 +181,12 @@ public class MsoMulticloudUtilsTest extends BaseTest {
@Test
public void createStackEmptyResponseEntity() throws MsoException {
- wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_CREATE_PATH)).willReturn(
- aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_CREATED)));
+ wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_CREATE_PATH)).willReturn(aResponse()
+ .withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_CREATED).withBody("{}")));
StackInfo result = multicloudUtils.createStack("MTN14", "CloudOwner", "TEST-tenant", "TEST-stack",
new VduModelInfo(), "TEST-heat", new HashMap<>(), false, 200, "TEST-env", new HashMap<>(),
new HashMap<>(), false, false);
assertNotNull(result);
- assertEquals("TEST-stack/", result.getName());
+ assertEquals("TEST-stack", result.getName());
}
}