aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@ericsson.com>2018-06-27 07:41:44 +0000
committerGerrit Code Review <gerrit@onap.org>2018-06-27 07:41:44 +0000
commit9a1113e4128f1585dbf85aabc429e9da385a76a8 (patch)
tree365275f9d4e4eb975beb898bfde7b716ae641a6c /ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java
parentb401754031d70b43ac1b1ee28256ea29add7ebf3 (diff)
parentc02b38c14ddeed80faebadc2c4dbe3cc6a056742 (diff)
Merge "Don't use hard-coded tmp path"
Diffstat (limited to 'ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java')
-rw-r--r--ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java
index 500136fc0..2e0a0de17 100644
--- a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java
+++ b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java
@@ -21,10 +21,13 @@ package org.onap.policy.xacml.test.std.pap;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.util.Properties;
+
import org.junit.Test;
import org.onap.policy.xacml.std.pap.StdEngineFactory;
+
import com.att.research.xacml.api.pap.PAPException;
import com.att.research.xacml.std.pap.StdEngine;
import com.att.research.xacml.util.FactoryException;
@@ -45,15 +48,16 @@ public class StdEngineFactoryTest {
}
@Test
- public void testNegativeCase() throws FactoryException, PAPException {
+ public void testNegativeCase() throws Exception {
// Setup test data
Properties props = new Properties();
- props.setProperty(StdEngine.PROP_PAP_REPO, "/tmp");
+ String tmpdir = System.getProperty("java.io.tmpdir");
+ props.setProperty(StdEngine.PROP_PAP_REPO, tmpdir);
// Set the system property temporarily
String systemKey = StdEngine.PROP_PAP_REPO;
String oldProperty = System.getProperty(systemKey);
- System.setProperty(systemKey, "/tmp");
+ System.setProperty(systemKey, tmpdir);
// Test factory failure cases
try {