summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates/template.demo/src/test/java')
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java12
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java14
2 files changed, 13 insertions, 13 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
index bae7a5155..f18b440d7 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
@@ -276,7 +276,7 @@ public class VCPEControlLoopTest implements TopicListener {
String policyName = notification.policyName;
if (policyName.endsWith("EVENT")) {
logger.debug("Rule Fired: " + notification.policyName);
- if ("getFail".equals(notification.AAI.get("generic-vnf.vnf-id"))) {
+ if ("getFail".equals(notification.AAI.get("generic-vnf.vnf-name"))) {
assertEquals(ControlLoopNotificationType.REJECTED, notification.notification);
kieSession.halt();
}
@@ -364,22 +364,22 @@ public class VCPEControlLoopTest implements TopicListener {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "generic-vnf.vnf-id";
+ event.target = "generic-vnf.vnf-name";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
- event.AAI.put("generic-vnf.vnf-id", "testGenericVnfID");
+ event.AAI.put("generic-vnf.vnf-name", "testGenericVnfName");
event.closedLoopEventStatus = status;
kieSession.insert(event);
}
- protected void sendEvent(ControlLoopPolicy policy, UUID requestID, ControlLoopEventStatus status, String vnfId) {
+ protected void sendEvent(ControlLoopPolicy policy, UUID requestID, ControlLoopEventStatus status, String vnfName) {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "generic-vnf.vnf-id";
+ event.target = "generic-vnf.vnf-name";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
- event.AAI.put("generic-vnf.vnf-id", vnfId);
+ event.AAI.put("generic-vnf.vnf-name", vnfName);
event.closedLoopEventStatus = status;
kieSession.insert(event);
}
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java
index 54591cad0..f73e3b39e 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java
@@ -322,7 +322,7 @@ public class VFWControlLoopTest implements TopicListener {
String policyName = notification.policyName;
if (policyName.endsWith("EVENT")) {
logger.debug("Rule Fired: " + notification.policyName);
- if ("getFail".equals(notification.AAI.get("generic-vnf.vnf-id"))) {
+ if ("getFail".equals(notification.AAI.get("generic-vnf.vnf-name"))) {
assertEquals(ControlLoopNotificationType.REJECTED, notification.notification);
kieSession.halt();
}
@@ -363,8 +363,8 @@ public class VFWControlLoopTest implements TopicListener {
}
else if (policyName.endsWith("EVENT.MANAGER")) {
logger.debug("Rule Fired: " + notification.policyName);
- if ("error".equals(notification.AAI.get("generic-vnf.vnf-id"))) {
- assertTrue(ControlLoopNotificationType.FINAL_FAILURE.equals(notification.notification));
+ if ("error".equals(notification.AAI.get("generic-vnf.vnf-name"))) {
+ assertEquals(ControlLoopNotificationType.FINAL_FAILURE, notification.notification);
assertEquals("Exception in processing closed loop", notification.message);
}
else {
@@ -408,10 +408,10 @@ public class VFWControlLoopTest implements TopicListener {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "generic-vnf.vnf-id";
+ event.target = "generic-vnf.vnf-name";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
- event.AAI.put("generic-vnf.vnf-id", "testGenericVnfID");
+ event.AAI.put("generic-vnf.vnf-name", "testGenericVnfID");
event.closedLoopEventStatus = status;
kieSession.insert(event);
}
@@ -429,10 +429,10 @@ public class VFWControlLoopTest implements TopicListener {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "generic-vnf.vnf-id";
+ event.target = "generic-vnf.vnf-name";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
- event.AAI.put("generic-vnf.vnf-id", vnfId);
+ event.AAI.put("generic-vnf.vnf-name", vnfId);
event.closedLoopEventStatus = status;
kieSession.insert(event);
}