From 4ac8ebc8e27ff7c87472f2ddacb7887f00cd284d Mon Sep 17 00:00:00 2001 From: krishna Date: Thu, 23 May 2019 20:15:02 +0530 Subject: Add second control loop name, Change restclient to support SSL Change-Id: I5ab334676f7f79cf2c42a9325ec1b7bfe8add6c5 Issue-ID: DCAEGEN2-1529 Signed-off-by: krishna --- .../org/onap/dcaegen2/services/sonhms/ConfigurationTest.java | 10 ++++++++++ .../dcaegen2/services/sonhms/child/TestChildThreadUtils.java | 2 +- src/test/resources/policy_notification.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/test') 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" } -- cgit 1.2.3-korg