From 92c372362b9c2dabc4bd0ff3eb6e65ad5659ffb4 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Mon, 28 Nov 2022 17:31:45 +0000 Subject: Save ToscaServiceTemplate as Json in ACM Save ToscaServiceTemplate as Json using DocToscaServiceTemplate as model. Issue-ID: POLICY-4468 Change-Id: I4c6f49012d091b87f0da4db2edcd5f16af2f4d5c Signed-off-by: FrancescoFioraEst --- .../acm/runtime/commissioning/rest/CommissioningControllerTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime-acm/src/test/java/org') diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java index e11ceeeb7..8066df434 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java @@ -153,9 +153,10 @@ class CommissioningControllerTest extends CommonRestController { toscaProperty.setType("onap.datatypes.ToscaConceptIdentifier"); toscaDataType.getProperties().put(toscaProperty.getName(), toscaProperty); - serviceTemplate.getDataTypes().put(toscaDataType.getName(), toscaDataType); + var serviceTemplateUpdate = new ToscaServiceTemplate(serviceTemplate); + serviceTemplateUpdate.getDataTypes().put(toscaDataType.getName(), toscaDataType); invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT + "/" + compositionId); - resp = invocationBuilder.put(Entity.json(serviceTemplate)); + resp = invocationBuilder.put(Entity.json(serviceTemplateUpdate)); assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus()); commissioningResponse = resp.readEntity(CommissioningResponse.class); assertNotNull(commissioningResponse); -- cgit 1.2.3-korg