summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/ConfigurationTest.java10
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java2
-rw-r--r--src/test/resources/policy_notification.json2
3 files changed, 12 insertions, 2 deletions
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/ConfigurationTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/ConfigurationTest.java
index f762a5b..8fb4087 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/ConfigurationTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/ConfigurationTest.java
@@ -59,8 +59,13 @@ public class ConfigurationTest {
configuration.setMinConfusion(5);
configuration.setNumSolutions(1);
configuration.setOofService("oofService");
+ configuration.setOofEndpoint("/api/oof/v1/pci");
+ configuration.setOofTriggerCountTimer(30);
+ configuration.setOofTriggerCountThreshold(5);
configuration.setBadThreshold(50);
configuration.setPoorThreshold(70);
+ configuration.setBadCountThreshold(3);
+ configuration.setPoorCountThreshold(3);
configuration.setPciOptimizer("pci");
configuration.setPciAnrOptimizer("pci-anr");
configuration.setPollingInterval(30);
@@ -78,6 +83,9 @@ public class ConfigurationTest {
assertEquals(5, configuration.getMinConfusion());
assertEquals(1, configuration.getNumSolutions());
assertEquals("oofService", configuration.getOofService());
+ assertEquals("/api/oof/v1/pci", configuration.getOofEndpoint());
+ assertEquals(30, configuration.getOofTriggerCountTimer());
+ assertEquals(5, configuration.getOofTriggerCountThreshold());
assertEquals("pci", configuration.getPciOptimizer());
assertEquals("pci-anr", configuration.getPciAnrOptimizer());
assertEquals("user", configuration.getPgUsername());
@@ -91,6 +99,8 @@ public class ConfigurationTest {
assertEquals("sourceId", configuration.getSourceId());
assertEquals(50, configuration.getBadThreshold());
assertEquals(70, configuration.getPoorThreshold());
+ assertEquals(3, configuration.getBadCountThreshold());
+ assertEquals(3, configuration.getPoorCountThreshold());
assertEquals(subscribes, configuration.getStreamsSubscribes());
assertEquals(subscribes, configuration.getStreamsPublishes());
}
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
index 92b2da1..f8a6ae2 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
@@ -163,7 +163,7 @@ public class TestChildThreadUtils {
String requestId = "a4130fd5-2291-4a83-8992-04e4c9f32731";
Long alarmStart = Long.parseLong("1542445563201");
- String result = childThreadUtils.getNotificationString(pnfName, requestId, "payloadString", alarmStart, "action");
+ String result = childThreadUtils.getNotificationString(pnfName, requestId, "payloadString", alarmStart, "ModifyConfig");
PolicyNotification actual = new PolicyNotification();
try {
actual = mapper.readValue(result, PolicyNotification.class);
diff --git a/src/test/resources/policy_notification.json b/src/test/resources/policy_notification.json
index b99a8b9..35fe06c 100644
--- a/src/test/resources/policy_notification.json
+++ b/src/test/resources/policy_notification.json
@@ -14,5 +14,5 @@
"generic-vnf.is-closed-loop-disabled": "false",
"generic-vnf.vnf-id": "ncserver23"
},
- "Action": "action"
+ "Action": "ModifyConfig"
}