From 24446884306a87a1d22fb8d0b28efbf41201a87c Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Mon, 19 Jul 2021 14:37:41 -0400 Subject: 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 --- .../xacml/pdp/application/match/MatchPdpApplicationTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'applications/match/src/test') 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"); -- cgit