summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates/template.demo')
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java4
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java10
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java5
3 files changed, 10 insertions, 9 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java
index 395ecc234..0ac9c48df 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java
@@ -73,6 +73,7 @@ public class CcvpnBwControlLoopTest implements TopicListener {
/* Set environment properties */
SupportUtil.setAaiProps();
SupportUtil.setSdncProps();
+ SupportUtil.setGuardProps();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@@ -102,6 +103,7 @@ public class CcvpnBwControlLoopTest implements TopicListener {
try {
SupportUtil.buildAaiSim();
SupportUtil.buildSdncSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -370,4 +372,4 @@ public class CcvpnBwControlLoopTest implements TopicListener {
logger.debug("FACT: " + handle);
}
}
-} \ No newline at end of file
+}
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java
index aa447ccd0..c546248f2 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java
@@ -72,6 +72,7 @@ public class CcvpnControlLoopTest implements TopicListener {
/* Set environment properties */
SupportUtil.setAaiProps();
SupportUtil.setSdncProps();
+ SupportUtil.setGuardProps();
LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@@ -101,6 +102,7 @@ public class CcvpnControlLoopTest implements TopicListener {
try {
SupportUtil.buildAaiSim();
SupportUtil.buildSdncSim();
+ SupportUtil.buildGuardSim();
} catch (Exception e) {
fail(e.getMessage());
}
@@ -158,7 +160,7 @@ public class CcvpnControlLoopTest implements TopicListener {
sendEvent(pair.first);
kieSession.fireUntilHalt();
-
+
// allow object clean-up
kieSession.fireAllRules();
@@ -204,7 +206,7 @@ public class CcvpnControlLoopTest implements TopicListener {
kieSession.insert(event);
kieSession.fireUntilHalt();
-
+
// allow object clean-up
kieSession.fireAllRules();
@@ -331,7 +333,7 @@ public class CcvpnControlLoopTest implements TopicListener {
/**
* This method is used to simulate event messages from DCAE that start the control loop (onset
* message) or end the control loop (abatement message).
- *
+ *
* @param policy the controlLoopName comes from the policy
*/
protected void sendEvent(ControlLoopPolicy policy) {
@@ -355,7 +357,7 @@ public class CcvpnControlLoopTest implements TopicListener {
/**
* Dumps the kie session facts.
- *
+ *
* @param kieSession input session
*/
public static void dumpFacts(KieSession kieSession) {
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
index 3091656c0..493ab9b2c 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
@@ -319,12 +319,9 @@ public final class SupportUtil {
/*
* Guard PDP-x connection Properties
*/
- PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_URL, "http://localhost:6669/pdp/api/getDecision");
+ PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_URL, "http://localhost:6669/policy/pdpx/v1/decision");
PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_USER, "python");
PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_PASS, "test");
- PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_CLIENT_USER, "python");
- PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_CLIENT_PASS, "test");
- PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_ENV, "TEST");
PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_DISABLED, "false");
}