From d5968f56b382c50dfafc3b6feeccf5b81d176b9d Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Fri, 5 Feb 2021 20:34:11 -0500 Subject: 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) Change-Id: Ic65b04772b91dd989e41d6b6b93872978bc4e4e2 --- .../main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java | 2 +- .../src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java | 1 + .../org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java | 3 --- .../java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java | 6 +++--- 4 files changed, 5 insertions(+), 7 deletions(-) (limited to 'adapters/mso-adapter-utils/src') 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()); } } -- cgit 1.2.3-korg