cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing rs-sec tests
Date Wed, 02 Aug 2017 15:39:17 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 16ddd3ee1 -> d8ecd66e0


Fixing rs-sec tests


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d8ecd66e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d8ecd66e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d8ecd66e

Branch: refs/heads/3.1.x-fixes
Commit: d8ecd66e05d0f53c738fa1fb4e22926c06602ef1
Parents: 16ddd3e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Aug 2 16:31:40 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Aug 2 16:38:59 2017 +0100

----------------------------------------------------------------------
 .../security/oauth2/filters/OAuth2FiltersTest.java  | 16 ++++++++--------
 .../oauth2/filters/OAuth2JwtFiltersTest.java        |  4 ++--
 .../security/oidc/filters/OIDCFiltersTest.java      |  4 ++--
 .../systest/jaxrs/security/xml/JAXRSXmlSecTest.java | 14 +++++++-------
 4 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d8ecd66e/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2FiltersTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2FiltersTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2FiltersTest.java
index bae918e..db78f17 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2FiltersTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2FiltersTest.java
@@ -78,8 +78,8 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase {
         WebClient client = WebClient.create(address, OAuth2TestUtils.setupProviders(), 
                                             busFile.toString());
         client.header("Authorization", "Bearer " + accessToken.getTokenKey());
-        
-        Response response = client.post(new Book("book", 123L));
+
+        Response response = client.type("application/xml").post(new Book("book", 123L));
         assertEquals(response.getStatus(), 200);
         
         Book returnedBook = response.readEntity(Book.class);
@@ -160,8 +160,8 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase
{
         WebClient client = WebClient.create(address, OAuth2TestUtils.setupProviders(),
                                             busFile.toString());
         client.header("Authorization", "Bearer " + accessToken.getTokenKey());
-        
-        Response response = client.post(new Book("book", 123L));
+
+        Response response = client.type("application/xml").post(new Book("book", 123L));
         assertEquals(response.getStatus(), 200);
         
         Book returnedBook = response.readEntity(Book.class);
@@ -278,8 +278,8 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase
{
         WebClient client = WebClient.create(address, OAuth2TestUtils.setupProviders(), 
                                             busFile.toString());
         client.header("Authorization", "Bearer " + accessToken.getTokenKey());
-        
-        Response response = client.post(new Book("book", 123L));
+
+        Response response = client.type("application/xml").post(new Book("book", 123L));
         assertEquals(response.getStatus(), 200);
         
         Book returnedBook = response.readEntity(Book.class);
@@ -320,8 +320,8 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase
{
         WebClient client = WebClient.create(address, OAuth2TestUtils.setupProviders(), 
                                             busFile.toString());
         client.header("Authorization", "Bearer " + accessToken.getTokenKey());
-        
-        Response response = client.post(new Book("book", 123L));
+
+        Response response = client.type("application/xml").post(new Book("book", 123L));
         assertEquals(response.getStatus(), 200);
         
         Book returnedBook = response.readEntity(Book.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/d8ecd66e/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2JwtFiltersTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2JwtFiltersTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2JwtFiltersTest.java
index 2f7f9ee..61106bf 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2JwtFiltersTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/filters/OAuth2JwtFiltersTest.java
@@ -105,8 +105,8 @@ public class OAuth2JwtFiltersTest extends AbstractBusClientServerTestBase
{
         WebClient client = WebClient.create(rsAddress, OAuth2TestUtils.setupProviders(),
                                             busFile.toString());
         client.header("Authorization", "Bearer " + accessToken.getTokenKey());
-        
-        Response response = client.post(new Book("book", 123L));
+
+        Response response = client.type("application/xml").post(new Book("book", 123L));
         assertEquals(200, response.getStatus());
         
         Book returnedBook = response.readEntity(Book.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/d8ecd66e/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oidc/filters/OIDCFiltersTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oidc/filters/OIDCFiltersTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oidc/filters/OIDCFiltersTest.java
index 097f146..0ad02bf 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oidc/filters/OIDCFiltersTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oidc/filters/OIDCFiltersTest.java
@@ -82,8 +82,8 @@ public class OIDCFiltersTest extends AbstractBusClientServerTestBase {
         // Now invoke back on the service using the authorization code
         client.query("code", code);
         client.query("state", state);
-        
-        Response serviceResponse = client.post(new Book("book", 123L));
+
+        Response serviceResponse = client.type("application/xml").post(new Book("book", 123L));
         assertEquals(serviceResponse.getStatus(), 200);
         
         Book returnedBook = serviceResponse.readEntity(Book.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/d8ecd66e/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
index 8cdb465..53e9cd8 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
@@ -299,9 +299,9 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
         Book book;
         if (!fromResponse) {
-            book = wc.post(new Book("CXF", 126L), Book.class);
+            book = wc.type("application/xml").post(new Book("CXF", 126L), Book.class);
         } else {
-            book = wc.post(new Book("CXF", 126L)).readEntity(Book.class);
+            book = wc.type("application/xml").post(new Book("CXF", 126L)).readEntity(Book.class);
         }
         assertEquals(126L, book.getId());
     }
@@ -344,7 +344,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         WebClient wc = bean.createWebClient();
         WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
         try {
-            wc.post(new Book("CXF", 126L), Book.class);
+            wc.type("application/xml").post(new Book("CXF", 126L), Book.class);
             fail("Failure expected on signature trust failure");
         } catch (WebApplicationException ex) {
             assertTrue(ex.getMessage().contains("400 Bad Request"));
@@ -389,7 +389,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         WebClient wc = bean.createWebClient();
         WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
         try {
-            wc.post(new Book("CXF", 126L), Book.class);
+            wc.type("application/xml").post(new Book("CXF", 126L), Book.class);
             fail("Failure expected on signature trust failure");
         } catch (ProcessingException ex) {
             assertTrue(ex.getCause() instanceof BadRequestException);
@@ -438,7 +438,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         WebClient wc = bean.createWebClient();
         WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
         try {
-            wc.post(new Book("CXF", 126L), Book.class);
+            wc.type("application/xml").post(new Book("CXF", 126L), Book.class);
             fail("Failure expected on an unsigned response message");
         } catch (ProcessingException ex) {
             assertTrue(ex.getCause() instanceof BadRequestException);
@@ -485,7 +485,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
 
         WebClient wc = bean.createWebClient();
         WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
-        Book book = wc.post(new Book("CXF", 126L), Book.class);
+        Book book = wc.type("application/xml").post(new Book("CXF", 126L), Book.class);
         assertEquals(126L, book.getId());
     }
 
@@ -686,7 +686,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
         WebClient wc = bean.createWebClient();
         WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
         try {
-            Book book = wc.post(new Book("CXF", 126L), Book.class);
+            Book book = wc.type("application/xml").post(new Book("CXF", 126L), Book.class);
             assertEquals(126L, book.getId());
         } catch (WebApplicationException ex) {
             if (propagateException) {


Mime
View raw message