summaryrefslogtreecommitdiffstats
path: root/applications/match
diff options
context:
space:
mode:
authorPamela Dragosh <pd1248@att.com>2021-07-19 14:37:41 -0400
committerPamela Dragosh <pd1248@att.com>2021-07-20 10:30:04 -0400
commit24446884306a87a1d22fb8d0b28efbf41201a87c (patch)
tree263eebaae79945d34aab98e149e10cdbb3bb1c8f /applications/match
parente3d0ebb1599c36f23ec82ca2f428af6db8fa4373 (diff)
Include returned attributes in Decision
Adds new method to return attributes in a decision, which can be configurable. By default it is turned off which ensures that the current functionality is maintained for our client applications. Enhanced the JUnits for the applications to ensure that no extra information is passed, thus maintaining backward compatibility. Issue-ID: POLICY-2865 Change-Id: Ia533e5462c0cb475cb1f72f34e95f128d6c52678 Signed-off-by: Pamela Dragosh <pd1248@att.com>
Diffstat (limited to 'applications/match')
-rw-r--r--applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java b/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
index ff154d93..3ceaa097 100644
--- a/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
+++ b/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
@@ -191,6 +191,12 @@ public class MatchPdpApplicationTest {
assertThat(response).isNotNull();
assertThat(response.getPolicies()).isEmpty();
//
+ // Match applications should not have this information returned
+ //
+ assertThat(response.getAdvice()).isNull();
+ assertThat(response.getObligations()).isNull();
+ assertThat(response.getAttributes()).isNull();
+ //
// Ask for foo
//
baseRequest.getResource().put("matchable", "foo");
@@ -201,6 +207,12 @@ public class MatchPdpApplicationTest {
assertThat(response).isNotNull();
assertThat(response.getPolicies()).hasSize(1);
//
+ // Match applications should not have this information returned
+ //
+ assertThat(response.getAdvice()).isNull();
+ assertThat(response.getObligations()).isNull();
+ assertThat(response.getAttributes()).isNull();
+ //
// Validate it
//
validateDecision(response, baseRequest, "value1");