diff options
author | eramkve <ram.krishna.verma@ericsson.com> | 2018-03-21 20:25:05 +0000 |
---|---|---|
committer | eramkve <ram.krishna.verma@ericsson.com> | 2018-03-21 20:40:21 +0000 |
commit | 6104273a0412c73bdbf63f68d88760dada0153d6 (patch) | |
tree | 26a933bf82850dcd88e31a014f55c9828ea51bbd /ONAP-PDP-REST/src/test | |
parent | 4938fc8ff0a231e26d63c06016365bea5c021c3f (diff) |
Fix vulnerabilities and bugs in policy/engine
Code fixes for 1 bug and 17 vulnerabilities reported by Sonar in
policy/engine
Change-Id: I7b641795c790ec15418bd9ae3a414279e1b0f733
Issue-ID: POLICY-662
Signed-off-by: eramkve <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'ONAP-PDP-REST/src/test')
7 files changed, 14 insertions, 14 deletions
diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/BRMSParamPolicyServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/BRMSParamPolicyServiceTest.java index 8867a7828..23e47f418 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/BRMSParamPolicyServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/BRMSParamPolicyServiceTest.java @@ -50,7 +50,7 @@ public class BRMSParamPolicyServiceTest { String succeeded = prop.getProperty("xacml.rest.pap.url"); List<String> paps = Arrays.asList(succeeded.split(",")); PAPServices.setPaps(paps); - PAPServices.junit = true; + PAPServices.setJunit(true); PolicyParameters policyParameters = new PolicyParameters(); policyParameters.setPolicyConfigType(PolicyConfigType.BRMS_PARAM); @@ -80,7 +80,7 @@ public class BRMSParamPolicyServiceTest { @After public void tearDown() throws Exception { PAPServices.setPaps(null); - PAPServices.junit = false; + PAPServices.setJunit(false); } @Test diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopFaultPolicyServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopFaultPolicyServiceTest.java index de884b349..c21bc9c77 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopFaultPolicyServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopFaultPolicyServiceTest.java @@ -47,7 +47,7 @@ public class ClosedLoopFaultPolicyServiceTest { String succeeded = prop.getProperty("xacml.rest.pap.url"); List<String> paps = Arrays.asList(succeeded.split(",")); PAPServices.setPaps(paps); - PAPServices.junit = true; + PAPServices.setJunit(true); PolicyParameters policyParameters = new PolicyParameters(); policyParameters.setPolicyConfigType(PolicyConfigType.ClosedLoop_Fault); @@ -69,7 +69,7 @@ public class ClosedLoopFaultPolicyServiceTest { @After public void tearDown() throws Exception { PAPServices.setPaps(null); - PAPServices.junit = false; + PAPServices.setJunit(false); } @Test diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopPMPolicyServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopPMPolicyServiceTest.java index 19bb279e6..99dc67742 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopPMPolicyServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/ClosedLoopPMPolicyServiceTest.java @@ -47,7 +47,7 @@ public class ClosedLoopPMPolicyServiceTest { String succeeded = prop.getProperty("xacml.rest.pap.url"); List<String> paps = Arrays.asList(succeeded.split(",")); PAPServices.setPaps(paps); - PAPServices.junit = true; + PAPServices.setJunit(true); PolicyParameters policyParameters = new PolicyParameters(); policyParameters.setPolicyConfigType(PolicyConfigType.ClosedLoop_PM); @@ -69,7 +69,7 @@ public class ClosedLoopPMPolicyServiceTest { @After public void tearDown() throws Exception { PAPServices.setPaps(null); - PAPServices.junit = false; + PAPServices.setJunit(false); } @Test diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/DecisionPolicyServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/DecisionPolicyServiceTest.java index 0fcb0027c..fe0668115 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/DecisionPolicyServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/DecisionPolicyServiceTest.java @@ -49,7 +49,7 @@ public class DecisionPolicyServiceTest { String succeeded = prop.getProperty("xacml.rest.pap.url"); List<String> paps = Arrays.asList(succeeded.split(",")); PAPServices.setPaps(paps); - PAPServices.junit = true; + PAPServices.setJunit(true); PolicyParameters policyParameters = new PolicyParameters(); policyParameters.setPolicyClass(PolicyClass.Decision); @@ -94,7 +94,7 @@ public class DecisionPolicyServiceTest { @After public void tearDown() throws Exception { PAPServices.setPaps(null); - PAPServices.junit = false; + PAPServices.setJunit(false); } @Test diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/FirewallPolicyServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/FirewallPolicyServiceTest.java index 4343a5060..ccedd7553 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/FirewallPolicyServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/FirewallPolicyServiceTest.java @@ -46,7 +46,7 @@ public class FirewallPolicyServiceTest { String succeeded = prop.getProperty("xacml.rest.pap.url"); List<String> paps = Arrays.asList(succeeded.split(",")); PAPServices.setPaps(paps); - PAPServices.junit = true; + PAPServices.setJunit(true); PolicyParameters policyParameters = new PolicyParameters(); policyParameters.setPolicyConfigType(PolicyConfigType.Firewall); //required @@ -67,7 +67,7 @@ public class FirewallPolicyServiceTest { @After public void tearDown() throws Exception { PAPServices.setPaps(null); - PAPServices.junit = false; + PAPServices.setJunit(false); } @Test diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/MicroServicesPolicyServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/MicroServicesPolicyServiceTest.java index a9301e728..e460a853b 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/MicroServicesPolicyServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/MicroServicesPolicyServiceTest.java @@ -47,7 +47,7 @@ public class MicroServicesPolicyServiceTest { String succeeded = prop.getProperty("xacml.rest.pap.url"); List<String> paps = Arrays.asList(succeeded.split(",")); PAPServices.setPaps(paps); - PAPServices.junit = true; + PAPServices.setJunit(true); PolicyParameters policyParameters = new PolicyParameters(); policyParameters.setPolicyConfigType(PolicyConfigType.MicroService); @@ -69,7 +69,7 @@ public class MicroServicesPolicyServiceTest { @After public void tearDown() throws Exception { PAPServices.setPaps(null); - PAPServices.junit = false; + PAPServices.setJunit(false); } @Test diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/PAPServicesTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/PAPServicesTest.java index 9d1d13910..93fde841d 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/PAPServicesTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/services/PAPServicesTest.java @@ -40,7 +40,7 @@ public class PAPServicesTest { @Before public void setUp() throws Exception { - PAPServices.junit = true; + PAPServices.setJunit(true); Properties prop = new Properties(); prop.load(new FileInputStream("src/test/resources/pass.xacml.pdp.properties")); String succeeded = prop.getProperty("xacml.rest.pap.url"); @@ -53,7 +53,7 @@ public class PAPServicesTest { @After public void tearDown() throws Exception { PAPServices.setPaps(null); - PAPServices.junit = false; + PAPServices.setJunit(false); } @Test |