aboutsummaryrefslogtreecommitdiffstats
path: root/applications/guard/src
diff options
context:
space:
mode:
authorHOCKLA <ah999m@att.com>2019-10-14 14:25:29 -0500
committerAli Hockla <ah999m@att.com>2019-10-18 07:57:48 -0500
commit9ff68b1ed845e94944f99c32eef209eb63c6469d (patch)
tree7dfc63117d3a2f94e84e011368ace480563c14fc /applications/guard/src
parentc19f81387f4efc666cfa45b000275f3ee7c1d9d1 (diff)
Modified Decision API to accept query parameters and abbreviate Monitor decision results
Issue-ID: POLICY-2126 Change-Id: I18d50a8746ede792ec9507ab98125383c5914ba1 Signed-off-by: HOCKLA <ah999m@att.com>
Diffstat (limited to 'applications/guard/src')
-rw-r--r--applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java5
-rw-r--r--applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java9
2 files changed, 4 insertions, 10 deletions
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java
index ecd0fb76..efa0bdc9 100644
--- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java
+++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java
@@ -25,7 +25,6 @@ package org.onap.policy.xacml.pdp.application.guard;
import static org.assertj.core.api.Assertions.assertThat;
import com.att.research.xacml.api.Response;
-
import java.io.File;
import java.io.IOException;
import java.sql.Date;
@@ -35,10 +34,8 @@ import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.UUID;
-
import javax.persistence.EntityManager;
import javax.persistence.Persistence;
-
import org.apache.commons.lang3.tuple.Pair;
import org.junit.AfterClass;
import org.junit.Before;
@@ -202,7 +199,7 @@ public class CoordinationTest {
//
// Ask for a decision
//
- Pair<DecisionResponse, Response> decision = service.makeDecision(request);
+ Pair<DecisionResponse, Response> decision = service.makeDecision(request, null);
//
// Check decision
//
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
index 4b9db0a3..7435fb96 100644
--- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
+++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
@@ -25,7 +25,6 @@ package org.onap.policy.xacml.pdp.application.guard;
import static org.assertj.core.api.Assertions.assertThat;
import com.att.research.xacml.api.Response;
-
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -37,10 +36,8 @@ import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.UUID;
-
import javax.persistence.EntityManager;
import javax.persistence.Persistence;
-
import org.apache.commons.lang3.tuple.Pair;
import org.junit.AfterClass;
import org.junit.Before;
@@ -196,7 +193,7 @@ public class GuardPdpApplicationTest {
//
// Ask for a decision
//
- Pair<DecisionResponse, Response> decision = service.makeDecision(request);
+ Pair<DecisionResponse, Response> decision = service.makeDecision(request, null);
//
// Check decision
//
@@ -344,7 +341,7 @@ public class GuardPdpApplicationTest {
//
// Ask for a decision - should get permit
//
- Pair<DecisionResponse, Response> decision = service.makeDecision(request);
+ Pair<DecisionResponse, Response> decision = service.makeDecision(request, null);
LOGGER.info("Looking for Permit Decision {}", decision.getKey());
assertThat(decision.getKey()).isNotNull();
assertThat(decision.getKey().getStatus()).isNotNull();
@@ -355,7 +352,7 @@ public class GuardPdpApplicationTest {
guard.put("vfCount", "10");
resource.put("guard", guard);
request.setResource(resource);
- decision = service.makeDecision(request);
+ decision = service.makeDecision(request, null);
LOGGER.info("Looking for Deny Decision {}", decision.getKey());
assertThat(decision.getKey()).isNotNull();
assertThat(decision.getKey().getStatus()).isNotNull();