You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/01/28 18:09:27 UTC
[2/2] cxf git commit: Fixing failing test with restricted security
policies installed
Fixing failing test with restricted security policies installed
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/da303b5a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/da303b5a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/da303b5a
Branch: refs/heads/2.7.x-fixes
Commit: da303b5a0e10cbd210868d72e87f995ea1feeea1
Parents: c5dee86
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Jan 28 16:59:30 2015 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Jan 28 17:08:37 2015 +0000
----------------------------------------------------------------------
.../systest/ws/fault/ModifiedRequestTest.java | 23 ++++++++++++++++++++
1 file changed, 23 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/da303b5a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
index bbcc4fe..50449ed 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
@@ -58,6 +58,9 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
+ private static boolean unrestrictedPoliciesInstalled =
+ SecurityTestUtil.checkUnrestrictedPoliciesInstalled();
+
@BeforeClass
public static void startServers() throws Exception {
assertTrue(
@@ -76,6 +79,10 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase {
@org.junit.Test
public void testModifiedSignedTimestamp() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
SpringBusFactory bf = new SpringBusFactory();
URL busFile = ModifiedRequestTest.class.getResource("client/client.xml");
@@ -104,6 +111,10 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase {
@org.junit.Test
public void testModifiedSignature() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
SpringBusFactory bf = new SpringBusFactory();
URL busFile = ModifiedRequestTest.class.getResource("client/client.xml");
@@ -132,6 +143,10 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase {
@org.junit.Test
public void testUntrustedSignature() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
SpringBusFactory bf = new SpringBusFactory();
URL busFile = ModifiedRequestTest.class.getResource("client/client-untrusted.xml");
@@ -155,6 +170,10 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase {
@org.junit.Test
public void testModifiedEncryptedKey() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
SpringBusFactory bf = new SpringBusFactory();
URL busFile = ModifiedRequestTest.class.getResource("client/client.xml");
@@ -183,6 +202,10 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase {
@org.junit.Test
public void testModifiedEncryptedSOAPBody() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
SpringBusFactory bf = new SpringBusFactory();
URL busFile = ModifiedRequestTest.class.getResource("client/client.xml");