aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-controlloop/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'runtime-controlloop/src/test')
-rw-r--r--runtime-controlloop/src/test/java/org/onap/policy/clamp/controlloop/runtime/instantiation/rest/InstantiationControllerTest.java10
1 files changed, 10 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 a6756eece..42e4ddee2 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
@@ -36,6 +36,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoops;
+import org.onap.policy.clamp.controlloop.models.messages.rest.instantiation.ControlLoopPrimedResponse;
import org.onap.policy.clamp.controlloop.models.messages.rest.instantiation.InstantiationCommand;
import org.onap.policy.clamp.controlloop.models.messages.rest.instantiation.InstantiationResponse;
import org.onap.policy.clamp.controlloop.runtime.instantiation.ControlLoopInstantiationProvider;
@@ -80,6 +81,8 @@ class InstantiationControllerTest extends CommonRestController {
private static final String INSTANTIATION_COMMAND_ENDPOINT = "instantiation/command";
+ private static final String PRIMING_ENDPOINT = "controlLoopPriming";
+
private static ToscaServiceTemplate serviceTemplate = new ToscaServiceTemplate();
private static final YamlJsonTranslator yamlTranslator = new YamlJsonTranslator();
@@ -174,6 +177,13 @@ class InstantiationControllerTest extends CommonRestController {
assertThat(controlLoopsFromDb.getControlLoopList()).hasSize(1);
assertEquals(controlLoopFromRsc, controlLoopsFromDb.getControlLoopList().get(0));
}
+
+ invocationBuilder = super.sendRequest(PRIMING_ENDPOINT + "?name="
+ + "PMSHInstance0Create" + "&version=" + "1.0.1");
+ Response rawresp = invocationBuilder.buildGet().invoke();
+ assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
+ ControlLoopPrimedResponse primResponse = rawresp.readEntity(ControlLoopPrimedResponse.class);
+ assertEquals(false, primResponse.getPrimedControlLoopsList().get(0).isPrimed());
}
@Test