aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/test
diff options
context:
space:
mode:
authorbrunomilitzer <bruno.militzer@est.tech>2022-05-05 15:20:30 +0100
committerbrunomilitzer <bruno.militzer@est.tech>2022-05-25 15:01:02 +0100
commitf35587328e1bd99882ed8a4df85d01660d54c007 (patch)
tree668b2e35b88a24dbf60ce84d62c21c463e2c0449 /runtime-acm/src/test
parentb77b61847ddd169da9a71b05742ed51bc826f5f6 (diff)
Added Edit Instance Properties Functionality
Issue-ID: POLICY-4094 Change-Id: Id52dba3c0912486fa551697be170c05542a0ee22 Signed-off-by: brunomilitzer <bruno.militzer@est.tech>
Diffstat (limited to 'runtime-acm/src/test')
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProviderTest.java3
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java2
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java5
3 files changed, 8 insertions, 2 deletions
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProviderTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProviderTest.java
index 71aadccb9..152171f9e 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProviderTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProviderTest.java
@@ -163,7 +163,8 @@ class CommissioningProviderTest {
when(serviceTemplateProvider.getServiceTemplateList(any(), any()))
.thenReturn(List.of(Objects.requireNonNull(serviceTemplate)));
- String returnedServiceTemplate = provider.getToscaServiceTemplateReduced(null, null);
+ String returnedServiceTemplate = provider
+ .getToscaServiceTemplateReduced(null, null, null);
assertThat(returnedServiceTemplate).isNotNull();
ToscaServiceTemplate parsedServiceTemplate = CODER.decode(returnedServiceTemplate, ToscaServiceTemplate.class);
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 87633dfd4..a0f1a7590 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
@@ -158,7 +158,7 @@ class CommissioningControllerTest extends CommonRestController {
createFullEntryInDbWithCommonProps();
Invocation.Builder invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT
- + "/getCommonOrInstanceProperties" + "?common=true&name=ToscaServiceTemplateSimple&version=1.0.0");
+ + "/getCommonOrInstanceProperties?common=true");
Response rawresp = invocationBuilder.buildGet().invoke();
assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java
index 248b04595..b826eebbc 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java
@@ -120,6 +120,11 @@ class AutomationCompositionInstantiationProviderTest {
automationComposition.setVersion(ID_VERSION);
when(acProvider.getAutomationCompositions(ID_NAME, ID_VERSION)).thenReturn(List.of(automationComposition));
+ var updatedInstancePropertyList = instantiationProvider.createInstanceProperties(serviceTemplate);
+ assertNull(updatedInstancePropertyList.getErrorDetails());
+ var updatedId = new ToscaConceptIdentifier(ID_NAME, ID_VERSION);
+ assertEquals(updatedId, instancePropertyList.getAffectedInstanceProperties().get(0));
+
var instanceOrderState = instantiationProvider.getInstantiationOrderState(ID_NAME, ID_VERSION);
assertEquals(AutomationCompositionOrderedState.UNINITIALISED, instanceOrderState.getOrderedState());
assertEquals(ID_NAME, instanceOrderState.getAutomationCompositionIdentifierList().get(0).getName());