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:31:55 GMT
Repository: cxf
Updated Branches:
  refs/heads/master c8828d4e2 -> 894c0a357


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/894c0a35
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/894c0a35
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/894c0a35

Branch: refs/heads/master
Commit: 894c0a35712c37b9e7a7de4376cc41d58d5f1239
Parents: c8828d4
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:31:40 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/894c0a35/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 b818ad4..987a7f6 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
@@ -79,7 +79,7 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase {
                                             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);
@@ -161,7 +161,7 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase
{
                                             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);
@@ -279,7 +279,7 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase
{
                                             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);
@@ -321,7 +321,7 @@ public class OAuth2FiltersTest extends AbstractBusClientServerTestBase
{
                                             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/894c0a35/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 2472907..4ba99ec 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
@@ -106,7 +106,7 @@ public class OAuth2JwtFiltersTest extends AbstractBusClientServerTestBase
{
                                             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/894c0a35/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 c85f192..f2e81c3 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
@@ -83,7 +83,7 @@ public class OIDCFiltersTest extends AbstractBusClientServerTestBase {
         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/894c0a35/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 29d1cc5..bbe4869 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