summaryrefslogtreecommitdiffstats
path: root/controlloop/common/rules-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/rules-test/src')
-rw-r--r--controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java53
-rw-r--r--controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTest.java1
-rw-r--r--controlloop/common/rules-test/src/main/resources/vcpe/tosca-legacy-vcpe.json9
-rw-r--r--controlloop/common/rules-test/src/main/resources/vdns/tosca-legacy-vdns.json9
-rw-r--r--controlloop/common/rules-test/src/main/resources/vfw/tosca-vfw.json9
-rw-r--r--controlloop/common/rules-test/src/main/resources/vpci/tosca-vpci.json11
-rw-r--r--controlloop/common/rules-test/src/main/resources/vsonh/tosca-vsonh.json10
-rw-r--r--controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java36
-rw-r--r--controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java2
9 files changed, 4 insertions, 136 deletions
diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
index 725057661..76048f534 100644
--- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
+++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
@@ -77,7 +77,6 @@ public abstract class BaseTest {
private static final String DUPLICATES_APPC_SUCCESS = "duplicates/duplicates.appc.success.json";
// VCPE
- private static final String VCPE_TOSCA_LEGACY_POLICY = "vcpe/tosca-legacy-vcpe.json";
private static final String VCPE_TOSCA_COMPLIANT_POLICY = "vcpe/tosca-compliant-vcpe.json";
private static final String VCPE_ONSET_1 = "vcpe/vcpe.onset.1.json";
private static final String VCPE_ONSET_2 = "vcpe/vcpe.onset.2.json";
@@ -85,13 +84,11 @@ public abstract class BaseTest {
private static final String VCPE_APPC_SUCCESS = "vcpe/vcpe.appc.success.json";
// VDNS
- private static final String VDNS_TOSCA_LEGACY_POLICY = "vdns/tosca-legacy-vdns.json";
private static final String VDNS_TOSCA_COMPLIANT_POLICY = "vdns/tosca-compliant-vdns.json";
private static final String VDNS_TOSCA_COMPLIANT_RAINY_POLICY = "vdns/tosca-compliant-vdns-rainy.json";
private static final String VDNS_ONSET = "vdns/vdns.onset.json";
// VFW
- private static final String VFW_TOSCA_LEGACY_POLICY = "vfw/tosca-vfw.json";
private static final String VFW_TOSCA_COMPLIANT_POLICY = "vfw/tosca-compliant-vfw.json";
private static final String VFW_TOSCA_COMPLIANT_TIME_OUT_POLICY = "vfw/tosca-compliant-timeout-vfw.json";
private static final String VFW_ONSET = "vfw/vfw.onset.json";
@@ -99,13 +96,11 @@ public abstract class BaseTest {
private static final String VFW_APPC_FAILURE = "vfw/vfw.appc.failure.json";
// VPCI
- private static final String VPCI_TOSCA_POLICY = "vpci/tosca-vpci.json";
private static final String VPCI_TOSCA_COMPLIANT_POLICY = "vpci/tosca-compliant-vpci.json";
private static final String VPCI_ONSET = "vpci/vpci.onset.json";
private static final String VPCI_SDNR_SUCCESS = "vpci/vpci.sdnr.success.json";
// VSONH
- private static final String VSONH_TOSCA_POLICY = "vsonh/tosca-vsonh.json";
private static final String VSONH_TOSCA_COMPLIANT_POLICY = "vsonh/tosca-compliant-vsonh.json";
private static final String VSONH_ONSET = "vsonh/vsonh.onset.json";
private static final String VSONH_SDNR_SUCCESS = "vsonh/vsonh.sdnr.success.json";
@@ -269,14 +264,6 @@ public abstract class BaseTest {
// VCPE
/**
- * Sunny Day with Legacy Tosca Policy.
- */
- @Test
- public void testVcpeSunnyDayLegacy() {
- appcLcmSunnyDay(VCPE_TOSCA_LEGACY_POLICY, VCPE_ONSET_1, APPC_RESTART_OP);
- }
-
- /**
* Sunny Day with Tosca Compliant Policy.
*/
@Test
@@ -298,14 +285,6 @@ public abstract class BaseTest {
// VDNS
/**
- * Sunny Day with Legacy Tosca Policy.
- */
- @Test
- public void testVdnsSunnyDayLegacy() {
- httpSunnyDay(VDNS_TOSCA_LEGACY_POLICY, VDNS_ONSET);
- }
-
- /**
* Sunny Day with Tosca Compliant Policy.
*/
@Test
@@ -325,14 +304,6 @@ public abstract class BaseTest {
// VFW
/**
- * VFW Sunny Day with Legacy Tosca Policy.
- */
- @Test
- public void testVfwSunnyDayLegacy() {
- appcLegacySunnyDay(VFW_TOSCA_LEGACY_POLICY, VFW_ONSET, APPC_MODIFY_CONFIG_OP);
- }
-
- /**
* VFW Sunny Day with Tosca Compliant Policy.
*/
@Test
@@ -341,14 +312,6 @@ public abstract class BaseTest {
}
/**
- * VFW Rainy Day using legacy tosca policy (operation and final failure).
- */
- @Test
- public void testVfwRainyDayLegacyFailure() {
- appcLegacyRainyDay(VFW_TOSCA_LEGACY_POLICY, VFW_ONSET, APPC_MODIFY_CONFIG_OP);
- }
-
- /**
* VFW Rainy Day using compliant tosca policy (final failure).
*/
@Test
@@ -365,14 +328,6 @@ public abstract class BaseTest {
}
/**
- * VPCI Sunny Day with Legacy Tosca Policy.
- */
- @Test
- public void testVpciSunnyDayLegacy() {
- sdnrSunnyDay(VPCI_TOSCA_POLICY, VPCI_ONSET, VPCI_SDNR_SUCCESS, "ModifyConfig");
- }
-
- /**
* VPCI Sunny Day Tosca Policy.
*/
@Test
@@ -383,14 +338,6 @@ public abstract class BaseTest {
// VSONH
/**
- * VSONH Sunny Day with Legacy Tosca Policy.
- */
- @Test
- public void testVsonhSunnyDayLegacy() {
- sdnrSunnyDay(VSONH_TOSCA_POLICY, VSONH_ONSET, VSONH_SDNR_SUCCESS, "ModifyConfigANR");
- }
-
- /**
* VSONH Sunny Day with Tosca Policy.
*/
@Test
diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTest.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTest.java
index a57395cb6..580b398e9 100644
--- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTest.java
+++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTest.java
@@ -21,7 +21,6 @@
package org.onap.policy.controlloop.common.rules.test;
import java.util.function.Function;
-import org.onap.policy.controlloop.ControlLoopNotificationType;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
diff --git a/controlloop/common/rules-test/src/main/resources/vcpe/tosca-legacy-vcpe.json b/controlloop/common/rules-test/src/main/resources/vcpe/tosca-legacy-vcpe.json
deleted file mode 100644
index cb0806e16..000000000
--- a/controlloop/common/rules-test/src/main/resources/vcpe/tosca-legacy-vcpe.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "type": "onap.policies.controlloop.Operational",
- "type_version": "1.0.0",
- "properties": {
- "content": "controlLoop%3A%0A%20%20version%3A%202.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0A%20%20trigger_policy%3A%20unique-policy-id-1-restart%0A%20%20timeout%3A%203600%0A%20%20abatement%3A%20false%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-1-restart%0A%20%20%20%20name%3A%20Restart%20the%20VM%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20APPC%0A%20%20%20%20recipe%3A%20Restart%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20type%3A%20VM%0A%20%20%20%20retry%3A%203%0A%20%20%20%20timeout%3A%201200%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard"
- },
- "name": "vcpe",
- "version": "1.0.0"
-}
diff --git a/controlloop/common/rules-test/src/main/resources/vdns/tosca-legacy-vdns.json b/controlloop/common/rules-test/src/main/resources/vdns/tosca-legacy-vdns.json
deleted file mode 100644
index e43ae09b0..000000000
--- a/controlloop/common/rules-test/src/main/resources/vdns/tosca-legacy-vdns.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "type": "onap.policies.controlloop.Operational",
- "type_version": "1.0.0",
- "properties": {
- "content": "controlLoop%3A%0A%20%20version%3A%202.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A%20%20services%3A%0A%20%20%20%20-%20serviceName%3A%20d4738992-6497-4dca-9db9%0A%20%20%20%20%20%20serviceInvariantUUID%3A%20dc112d6e-7e73-4777-9c6f-1a7fb5fd1b6f%0A%20%20%20%20%20%20serviceUUID%3A%202eea06c6-e1d3-4c3a-b9c4-478c506eeedf%0A%20%20trigger_policy%3A%20unique-policy-id-1-scale-up%0A%20%20timeout%3A%2060%0A%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-1-scale-up%0A%20%20%20%20name%3A%20Create%20a%20new%20VF%20Module%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20SO%0A%20%20%20%20recipe%3A%20VF%20Module%20Create%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20type%3A%20VFMODULE%0A%20%20%20%20%20%20modelInvariantId%3A%20e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e%0A%20%20%20%20%20%20modelVersionId%3A%2094b18b1d-cc91-4f43-911a-e6348665f292%0A%20%20%20%20%20%20modelName%3A%20VfwclVfwsnkBbefb8ce2bde..base_vfw..module-0%0A%20%20%20%20%20%20modelVersion%3A%201%0A%20%20%20%20%20%20modelCustomizationId%3A%2047958575-138f-452a-8c8d-d89b595f8164%0A%20%20%20%20payload%3A%0A%20%20%20%20%20%20requestParameters%3A%20%27%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D%27%0A%20%20%20%20%20%20configurationParameters%3A%20%27%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D%27%0A%20%20%20%20retry%3A%200%0A%20%20%20%20timeout%3A%2030%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard%0A"
- },
- "name": "vdns",
- "version": "1.0.0"
-}
diff --git a/controlloop/common/rules-test/src/main/resources/vfw/tosca-vfw.json b/controlloop/common/rules-test/src/main/resources/vfw/tosca-vfw.json
deleted file mode 100644
index b9f6b7f43..000000000
--- a/controlloop/common/rules-test/src/main/resources/vfw/tosca-vfw.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "type": "onap.policies.controlloop.Operational",
- "type_version": "1.0.0",
- "properties": {
- "content": "controlLoop%3A%0A%20%20version%3A%202.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0A%20%20services%3A%0A%20%20%20%20-%20serviceInvariantUUID%3A%20f6937c86-584c-47ae-ad29-8d41d6f0cc7c%0A%20%20%20%20%20%20serviceUUID%3A%207be584e2-0bb2-4126-adaf-ced2c77ca0b3%0A%20%20%20%20%20%20serviceName%3A%20Service_Ete_Name7ba1fbde-6187-464a-a62d-d9dd25bdf4e8%0A%20%20trigger_policy%3A%20unique-policy-id-1-modifyConfig%0A%20%20timeout%3A%2060%0A%20%20abatement%3A%20false%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-1-modifyConfig%0A%20%20%20%20name%3A%20modify%20packet%20gen%20config%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20APPC%0A%20%20%20%20recipe%3A%20ModifyConfig%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20resourceID%3A%20bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38%0A%20%20%20%20%20%20type%3A%20VNF%0A%20%20%20%20retry%3A%200%0A%20%20%20%20timeout%3A%207%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard"
- },
- "name": "vfw",
- "version": "1.0.0"
-}
diff --git a/controlloop/common/rules-test/src/main/resources/vpci/tosca-vpci.json b/controlloop/common/rules-test/src/main/resources/vpci/tosca-vpci.json
deleted file mode 100644
index 84b047e4d..000000000
--- a/controlloop/common/rules-test/src/main/resources/vpci/tosca-vpci.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "type": "onap.policies.controlloop.Operational",
- "type_version": "1.0.0",
- "properties": {
- "policy-id": "operational.pcihandler",
- "content": "controlLoop%3A%0A%20%20version%3A%203.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459%0A%20%20trigger_policy%3A%20unique-policy-id-123-modifyconfig%0A%20%20timeout%3A%201200%0A%20%20abatement%3A%20false%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-123-modifyconfig%0A%20%20%20%20name%3A%20modify%20PCI%20config%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20SDNR%0A%20%20%20%20recipe%3A%20ModifyConfig%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20%23%20These%20fields%20are%20not%20used%0A%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20type%3A%20PNF%0A%20%20%20%20retry%3A%200%0A%20%20%20%20timeout%3A%207000%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard"
- },
- "name": "vpci",
- "version": "1.0.0"
-
-}
diff --git a/controlloop/common/rules-test/src/main/resources/vsonh/tosca-vsonh.json b/controlloop/common/rules-test/src/main/resources/vsonh/tosca-vsonh.json
deleted file mode 100644
index 4927bee96..000000000
--- a/controlloop/common/rules-test/src/main/resources/vsonh/tosca-vsonh.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "type": "onap.policies.controlloop.Operational",
- "type_version": "1.0.0",
- "properties": {
- "policy-id": "operational.sonhandler",
- "content": "controlLoop%3A%0A%20%20version%3A%204.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61%0A%20%20trigger_policy%3A%20unique-policy-id-456-modifyconfig%0A%20%20timeout%3A%201200%0A%20%20abatement%3A%20false%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-456-modifyconfig%0A%20%20%20%20name%3A%20modify%20ANR%20config%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20SDNR%0A%20%20%20%20recipe%3A%20ModifyConfigANR%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20%23%20These%20fields%20are%20not%20used%0A%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20type%3A%20PNF%0A%20%20%20%20retry%3A%200%0A%20%20%20%20timeout%3A%20300%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard"
- },
- "name": "sonh",
- "version": "1.0.0"
-}
diff --git a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java
index ecff7e0bb..ea90a6ba6 100644
--- a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java
+++ b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java
@@ -136,8 +136,8 @@ public class BaseTestTest {
any(StandardCoder.class))).thenReturn(appcLcmRead);
when(topics.createListener(eq(BaseTest.APPC_CL_TOPIC), eq(Request.class),
any(StandardCoderInstantAsMillis.class))).thenReturn(appcClSink);
- when(topics.createListener(eq(BaseTest.SDNR_CL_TOPIC), eq(PciMessage.class),
- any(StandardCoder.class))).thenReturn(sdnrClSink);
+ when(topics.createListener(eq(BaseTest.SDNR_CL_TOPIC), eq(PciMessage.class), any(StandardCoder.class)))
+ .thenReturn(sdnrClSink);
Supplier<HttpClients> httpClientMaker = this::makeHttpClients;
Supplier<Simulators> simMaker = this::makeSim;
@@ -204,7 +204,7 @@ public class BaseTestTest {
@Test
public void testInit() {
- assertSame(topics, base.getTopics());
+ assertSame(topics, BaseTest.getTopics());
}
@Test
@@ -265,11 +265,6 @@ public class BaseTestTest {
}
@Test
- public void testTestVcpeSunnyDayLegacy() {
- checkAppcLcmPolicy("restart", base::testVcpeSunnyDayLegacy);
- }
-
- @Test
public void testTestVcpeSunnyDayCompliant() {
checkAppcLcmPolicy("restart", base::testVcpeSunnyDayCompliant);
}
@@ -296,11 +291,6 @@ public class BaseTestTest {
}
@Test
- public void testTestVdnsSunnyDayLegacy() {
- checkHttpPolicy(base::testVdnsSunnyDayLegacy);
- }
-
- @Test
public void testTestVdnsSunnyDayCompliant() {
checkHttpPolicy(base::testVdnsSunnyDayCompliant);
}
@@ -311,21 +301,11 @@ public class BaseTestTest {
}
@Test
- public void testTestVfwSunnyDayLegacy() {
- checkAppcLegacyPolicy("ModifyConfig", base::testVfwSunnyDayLegacy);
- }
-
- @Test
public void testTestVfwSunnyDayCompliant() {
checkAppcLegacyPolicy("ModifyConfig", base::testVfwSunnyDayCompliant);
}
@Test
- public void testTestVfwRainyDayLegacyFailure() {
- checkAppcLegacyPolicyOperationFailure("ModifyConfig", base::testVfwRainyDayLegacyFailure);
- }
-
- @Test
public void testTestVfwRainyDayOverallTimeout() {
checkAppcLegacyPolicyFinalFailure("ModifyConfig", base::testVfwRainyDayOverallTimeout);
}
@@ -336,21 +316,11 @@ public class BaseTestTest {
}
@Test
- public void testTestVpciSunnyDayLegacy() {
- checkSdnrPolicy("ModifyConfig", base::testVpciSunnyDayLegacy);
- }
-
- @Test
public void testTestVpciSunnyDayCompliant() {
checkSdnrPolicy("ModifyConfig", base::testVpciSunnyDayCompliant);
}
@Test
- public void testTestVsonhSunnyDayLegacy() {
- checkSdnrPolicy("ModifyConfigANR", base::testVsonhSunnyDayLegacy);
- }
-
- @Test
public void testTestVsonhSunnyDayCompliant() {
checkSdnrPolicy("ModifyConfigANR", base::testVsonhSunnyDayCompliant);
}
diff --git a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java
index a21fa0a93..43392b9bb 100644
--- a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java
+++ b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java
@@ -204,7 +204,7 @@ public class DroolsRuleTestTest {
@Test
public void testInit() {
- assertSame(topics, base.getTopics());
+ assertSame(topics, BaseTest.getTopics());
assertSame(controller, base.controller);
}