Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 32e2daf83 -> 2783922f0
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/2783922f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2783922f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2783922f Branch: refs/heads/3.0.x-fixes Commit: 2783922f009ce82e338633fc914b7095d5f43286 Parents: 32e2daf Author: Colm O hEigeartaigh <cohei...@apache.org> Authored: Wed Jan 28 16:59:30 2015 +0000 Committer: Colm O hEigeartaigh <cohei...@apache.org> Committed: Wed Jan 28 17:00:35 2015 +0000 ---------------------------------------------------------------------- .../systest/ws/fault/ModifiedRequestTest.java | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/2783922f/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 7205ce5..af38d6e 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 @@ -59,6 +59,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( @@ -77,6 +80,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.xml"); @@ -115,6 +122,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.xml"); @@ -153,6 +164,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-untrusted.xml"); @@ -182,6 +197,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.xml"); @@ -220,6 +239,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.xml");