aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorkrishna <krishna.moorthy6@wipro.com>2019-05-23 20:15:02 +0530
committerkrishna <krishna.moorthy6@wipro.com>2019-05-23 22:54:31 +0530
commit4ac8ebc8e27ff7c87472f2ddacb7887f00cd284d (patch)
tree9ab439708e4b4a0def697132cf548720535407e9 /src/test
parent2e5cff2dd7950ca969a8b0b225d7344075495484 (diff)
Add second control loop name, Change restclient to support SSL4.0.0-ONAP1.0.3dublin
Change-Id: I5ab334676f7f79cf2c42a9325ec1b7bfe8add6c5 Issue-ID: DCAEGEN2-1529 Signed-off-by: krishna <krishna.moorthy6@wipro.com>
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"
}