summaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/test/java/org
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2020-09-02 17:19:26 +0100
committera.sreekumar <ajith.sreekumar@bell.ca>2020-09-09 10:18:02 +0100
commit4c5c31eb9a2513af080d60d0f537b8339856150d (patch)
tree79aaf0d50cc261f57ce77f2eeae927c3c264478f /services/services-onappf/src/test/java/org
parentd350fd659d716ca0b1678029230cc799cead2056 (diff)
APEX standalone support for ToscaPolicy format
Legacy format support is removed, and Tosca format support is added. Change-Id: I3cfc181ccb5471a5d224c0162af18c1fa0fdbc70 Issue-ID: POLICY-2812 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'services/services-onappf/src/test/java/org')
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java5
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java9
2 files changed, 8 insertions, 6 deletions
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java
index 17f909fcc..1d491ea03 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2020 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -156,7 +157,7 @@ public class TestPdpStateChangeListener {
assertTrue(outContent.toString().contains("State changed to active. No policies found."));
final ToscaPolicy toscaPolicy =
- TestListenerUtils.createToscaPolicy("apex policy name", "1.0", "src/test/resources/dummyProperties.json");
+ TestListenerUtils.createToscaPolicy("apex_policy_name", "1.0", "src/test/resources/dummyProperties.json");
final List<ToscaPolicy> toscaPolicies = new ArrayList<ToscaPolicy>();
toscaPolicies.add(toscaPolicy);
final PdpUpdate pdpUpdateMsg = TestListenerUtils.createPdpUpdateMsg(pdpStatus, toscaPolicies);
@@ -179,7 +180,7 @@ public class TestPdpStateChangeListener {
public void testPdpStateChangeMessageListener_activetopassive() throws InterruptedException, CoderException {
final PdpStatus pdpStatus = Registry.get(ApexStarterConstants.REG_PDP_STATUS_OBJECT);
final ToscaPolicy toscaPolicy =
- TestListenerUtils.createToscaPolicy("apex policy name", "1.0", "src/test/resources/dummyProperties.json");
+ TestListenerUtils.createToscaPolicy("apex_policy_name", "1.0", "src/test/resources/dummyProperties.json");
final List<ToscaPolicy> toscaPolicies = new ArrayList<ToscaPolicy>();
toscaPolicies.add(toscaPolicy);
final PdpUpdate pdpUpdateMsg = TestListenerUtils.createPdpUpdateMsg(pdpStatus, toscaPolicies);
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java
index 05656af96..d9b8fc09c 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -142,7 +143,7 @@ public class TestPdpUpdateListener {
TestListenerUtils.createPdpStateChangeMsg(PdpState.ACTIVE, "pdpGroup", "pdpSubgroup", pdpStatus.getName());
pdpStateChangeListener.onTopicEvent(INFRA, TOPIC, null, pdpStateChangeMsg);
final ToscaPolicy toscaPolicy =
- TestListenerUtils.createToscaPolicy("apex policy name", "1.0", "src/test/resources/dummyProperties.json");
+ TestListenerUtils.createToscaPolicy("apex_policy_name", "1.0", "src/test/resources/dummyProperties.json");
final List<ToscaPolicy> toscaPolicies = new ArrayList<ToscaPolicy>();
toscaPolicies.add(toscaPolicy);
final PdpUpdate pdpUpdateMsg = TestListenerUtils.createPdpUpdateMsg(pdpStatus, toscaPolicies);
@@ -164,7 +165,7 @@ public class TestPdpUpdateListener {
TestListenerUtils.createPdpStateChangeMsg(PdpState.ACTIVE, "pdpGroup", "pdpSubgroup", pdpStatus.getName());
pdpStateChangeListener.onTopicEvent(INFRA, TOPIC, null, pdpStateChangeMsg);
final ToscaPolicy toscaPolicy =
- TestListenerUtils.createToscaPolicy("apex policy name", "1.0", "src/test/resources/dummyProperties.json");
+ TestListenerUtils.createToscaPolicy("apex_policy_name", "1.0", "src/test/resources/dummyProperties.json");
final List<ToscaPolicy> toscaPolicies = new ArrayList<ToscaPolicy>();
toscaPolicies.add(toscaPolicy);
final PdpUpdate pdpUpdateMsg = TestListenerUtils.createPdpUpdateMsg(pdpStatus, toscaPolicies);
@@ -185,7 +186,7 @@ public class TestPdpUpdateListener {
System.setOut(new PrintStream(outContent));
final PdpStatus pdpStatus = Registry.get(ApexStarterConstants.REG_PDP_STATUS_OBJECT);
final ToscaPolicy toscaPolicy =
- TestListenerUtils.createToscaPolicy("apex policy name", "1.0", "src/test/resources/dummyProperties.json");
+ TestListenerUtils.createToscaPolicy("apex_policy_name", "1.0", "src/test/resources/dummyProperties.json");
final ToscaPolicy toscaPolicy2 =
TestListenerUtils.createToscaPolicy("apexpolicy2", "1.0", "src/test/resources/dummyProperties.json");
final List<ToscaPolicy> toscaPolicies = new ArrayList<ToscaPolicy>();
@@ -198,7 +199,7 @@ public class TestPdpUpdateListener {
pdpStateChangeListener.onTopicEvent(INFRA, TOPIC, null, pdpStateChangeMsg);
final String outString = outContent.toString();
assertTrue(outString.contains(
- "Apex engine started. But, only the following polices are running - apex policy name:1.0 . "
+ "Apex engine started. But, only the following polices are running - apex_policy_name:1.0 . "
+ "Other policies failed execution. Please see the logs for more details."));
}
}