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.java9
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java10
2 files changed, 9 insertions, 10 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 a34ee6cd1..182e39828 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
@@ -294,7 +294,7 @@ public class VCPEControlLoopTest {
/*
* One final check to make sure the lock is released
*/
- assertFalse(PolicyGuard.isLocked(TargetType.VM, triggerSourceName, requestID));
+ assertFalse(PolicyGuard.isLocked(TargetType.VNF, triggerSourceName, requestID));
}
else {
fail("Operation Denied by Guard");
@@ -389,13 +389,12 @@ public class VCPEControlLoopTest {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "vserver.vserver-name";
+ event.target = "generic-vnf.vnf-id";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
event.AAI.put("cloud-region.identity-url", "foo");
event.AAI.put("vserver.selflink", "bar");
event.AAI.put("vserver.is-closed-loop-disabled", "false");
- event.AAI.put("vserver.vserver-name", "testGenericVnfName");
event.AAI.put("generic-vnf.vnf-id", "testGenericVnfId");
event.closedLoopEventStatus = ControlLoopEventStatus.ONSET;
kieSession.insert(event);
@@ -415,14 +414,14 @@ public class VCPEControlLoopTest {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "vserver.vserver-name";
+ event.target = "generic-vnf.vnf-id";
event.closedLoopAlarmStart = Instant.now().minusSeconds(5);
event.closedLoopAlarmEnd = Instant.now();
event.AAI = new HashMap<>();
event.AAI.put("cloud-region.identity-url", "foo");
event.AAI.put("vserver.selflink", "bar");
event.AAI.put("vserver.is-closed-loop-disabled", "false");
- event.AAI.put("generic-vnf.vnf-name", "testGenericVnfName");
+ event.AAI.put("generic-vnf.vnf-id", "testGenericVnfId");
event.closedLoopEventStatus = ControlLoopEventStatus.ABATED;
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 25920e8b5..e2b688d5d 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
@@ -289,7 +289,7 @@ public class VFWControlLoopTest {
/*
* One final check to make sure the lock is released
*/
- assertFalse(PolicyGuard.isLocked(TargetType.VM, triggerSourceName, requestID));
+ assertFalse(PolicyGuard.isLocked(TargetType.VNF, triggerSourceName, requestID));
}
else {
fail("Operation Denied by Guard");
@@ -384,13 +384,13 @@ public class VFWControlLoopTest {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "vserver.vserver-name";
+ event.target = "generic-vnf.vnf-id";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
event.AAI.put("cloud-region.identity-url", "foo");
event.AAI.put("vserver.selflink", "bar");
event.AAI.put("vserver.is-closed-loop-disabled", "false");
- event.AAI.put("vserver.vserver-name", "testGenericVnfName");
+ event.AAI.put("generic-vnf.vnf-id", "testGenericVnfID");
event.closedLoopEventStatus = ControlLoopEventStatus.ONSET;
kieSession.insert(event);
Thread.sleep(2000);
@@ -409,14 +409,14 @@ public class VFWControlLoopTest {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "vserver.vserver-name";
+ event.target = "generic-vnf.vnf-id";
event.closedLoopAlarmStart = Instant.now().minusSeconds(5);
event.closedLoopAlarmEnd = Instant.now();
event.AAI = new HashMap<>();
event.AAI.put("cloud-region.identity-url", "foo");
event.AAI.put("vserver.selflink", "bar");
event.AAI.put("vserver.is-closed-loop-disabled", "false");
- event.AAI.put("generic-vnf.vnf-name", "testGenericVnfName");
+ event.AAI.put("generic-vnf.vnf-id", "testGenericVnfID");
event.closedLoopEventStatus = ControlLoopEventStatus.ABATED;
kieSession.insert(event);
}