summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime-controlloop/src/test/java/org/onap/policy/clamp/controlloop/runtime/instantiation/rest/InstantiationControllerTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime-controlloop/src/test/java/org/onap/policy/clamp/controlloop/runtime/instantiation/rest/InstantiationControllerTest.java b/runtime-controlloop/src/test/java/org/onap/policy/clamp/controlloop/runtime/instantiation/rest/InstantiationControllerTest.java
index 5d5f4fc55..9cc0195d9 100644
--- a/runtime-controlloop/src/test/java/org/onap/policy/clamp/controlloop/runtime/instantiation/rest/InstantiationControllerTest.java
+++ b/runtime-controlloop/src/test/java/org/onap/policy/clamp/controlloop/runtime/instantiation/rest/InstantiationControllerTest.java
@@ -314,6 +314,23 @@ class InstantiationControllerTest extends CommonRestController {
}
@Test
+ void testCreateInstanceProperties() throws Exception {
+ Invocation.Builder invocationBuilder = super.sendRequest(INSTANTIATION_PROPERTIES);
+ Response resp = invocationBuilder.post(Entity.json(serviceTemplate));
+ assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus());
+ var instancePropertyList = resp.readEntity(InstancePropertiesResponse.class);
+ assertNull(instancePropertyList.getErrorDetails());
+ var id = new ToscaConceptIdentifier(ID_NAME, ID_VERSION);
+ assertEquals(id, instancePropertyList.getAffectedInstanceProperties().get(0));
+
+ invocationBuilder = super.sendRequest(INSTANTIATION_ENDPOINT);
+ resp = invocationBuilder.get();
+ assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus());
+ var controlLoopsGet = resp.readEntity(ControlLoops.class);
+ assertThat(controlLoopsGet.getControlLoopList()).hasSize(1);
+ }
+
+ @Test
void testDeleteInstanceProperties() throws Exception {
Invocation.Builder invocationBuilder = super.sendRequest(INSTANTIATION_PROPERTIES);
Response resp = invocationBuilder.post(Entity.json(serviceTemplate));