summaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/test
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-05-28 11:40:37 +0100
committera.sreekumar <ajith.sreekumar@bell.ca>2021-05-31 16:24:38 +0100
commit328fa34f8ac18d30fec00c7c5f59a05850f631a5 (patch)
tree86783b43a875dee386f2752cf528e64c8d7192d3 /services/services-onappf/src/test
parentc70c2179f1555e356794145956cbe32a3407e622 (diff)
Fixing issues around policy deployment in APEX
Following items are fixed. 1) When in PASSIVE state, any policiesToBeUndeployed received in PDP_UPDATE message are not handled. 2) APEX policy deployment fails when policiesToBeUndeployed and policiesToBeDeployed come together in PDP_UPDATE message from PAP. 3) Improve response messages after deployment/undeployment. Change-Id: I8f9c802db4b19c43881c734570b65ad66b3867d5 Issue-ID: POLICY-3332 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'services/services-onappf/src/test')
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java4
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java4
2 files changed, 4 insertions, 4 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 10f82633f..dda98db94 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,7 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2021 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 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.
@@ -169,7 +169,7 @@ public class TestPdpStateChangeListener {
final PdpUpdate pdpUpdateMsg = TestListenerUtils.createPdpUpdateMsg(pdpStatus, toscaPolicies,
new ArrayList<>());
pdpUpdateMessageListener.onTopicEvent(INFRA, TOPIC, null, pdpUpdateMsg);
- assertThat(outContent.toString()).contains("Apex engine started and policies are running.");
+ assertThat(outContent.toString()).contains("Apex engine started. Deployed policies are: apex_policy_name:1.0");
assertEquals(PdpState.ACTIVE, pdpStatus.getState());
final ApexPolicyStatisticsManager policyCounterManager = ApexPolicyStatisticsManager.getInstanceFromRegistry();
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 ec3da9bc3..9d314b41a 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,7 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2021 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 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.
@@ -161,7 +161,7 @@ public class TestPdpUpdateListener {
assertEquals(pdpStatus.getPdpSubgroup(), pdpUpdateMsg.getPdpSubgroup());
assertEquals(pdpStatus.getPolicies(),
new PdpMessageHandler().getToscaPolicyIdentifiers(pdpUpdateMsg.getPoliciesToBeDeployed()));
- assertThat(outString).contains("Apex engine started and policies are running.");
+ assertThat(outString).contains("Apex engine started. Deployed policies are: apex_policy_name:1.0");
}
@Test