aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.vfc/src/test
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-05 21:07:07 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-04-08 10:42:22 -0400
commitada55be1b59899e461dc5177782e381f89cbc407 (patch)
tree7bdb3eb5fe44e166a75a3333bf81f2293a3585de /models-interactions/model-actors/actor.vfc/src/test
parenteb7127ac85b3df30a09277721a5f9271033843e7 (diff)
Remove drools PDP dependency
Removing working memory and use of PolicyEngine from drools in these classes. Cleaned up some unused imports and checkstyle. Issue-ID: POLICY-1264 Change-Id: Id059da9689a721b0eafc6b310adcbdad43574ce7 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.vfc/src/test')
-rw-r--r--models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java26
1 files changed, 10 insertions, 16 deletions
diff --git a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
index 5d4447b8b..80ec3476e 100644
--- a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
@@ -38,7 +38,6 @@ import org.onap.policy.common.endpoints.http.server.HttpServletServer;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.policy.Policy;
-import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.simulators.Util;
import org.onap.policy.vfc.VfcRequest;
@@ -69,37 +68,32 @@ public class VfcActorServiceProviderTest {
Policy policy = new Policy();
policy.setRecipe("GoToOz");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, null, null, null));
onset.getAai().put("generic-vnf.vnf-id", "dorothy.gale.1939");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, null, null, null));
- PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666");
- PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI");
- PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, "http://localhost:6666", "AAI", "AAI"));
UUID requestId = UUID.randomUUID();
onset.setRequestId(requestId);
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, "http://localhost:6666", "AAI", "AAI"));
onset.getAai().put("generic-vnf.vnf-name", "Dorothy");
- PolicyEngine.manager.getEnvironment().remove("aai.password");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, "http://localhost:6666", "AAI", null));
- PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, "http://localhost:6666", "AAI", "AAI"));
onset.getAai().put("service-instance.service-instance-id", "");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, "http://localhost:6666", "AAI", "AAI"));
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()));
+ assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(), "http://localhost:6666", "AAI", "AAI"));
policy.setRecipe("Restart");
- assertNotNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()));
+ assertNotNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(), "http://localhost:6666", "AAI", "AAI"));
VfcRequest request =
- VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse());
+ VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(), "http://localhost:6666", "AAI", "AAI");
assertEquals(requestId, Objects.requireNonNull(request).getRequestId());
assertEquals("dorothy.gale.1939", request.getHealRequest().getVnfInstanceId());