knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject knox git commit: KNOX-1037 - Upgrade rest-assured dependency
Date Wed, 13 Sep 2017 13:20:33 GMT
Repository: knox
Updated Branches:
  refs/heads/master 751f76489 -> e2e125146


KNOX-1037 - Upgrade rest-assured dependency


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

Branch: refs/heads/master
Commit: e2e1251466c26ea70c145f1b456eaa42d2002f24
Parents: 751f764
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Sep 13 12:01:31 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Sep 13 14:20:21 2017 +0100

----------------------------------------------------------------------
 gateway-server/pom.xml                          | 22 -----
 gateway-test/pom.xml                            | 12 +--
 .../gateway/AmbariServiceDefinitionTest.java    |  2 +-
 .../hadoop/gateway/GatewayAdminFuncTest.java    |  2 +-
 .../gateway/GatewayAdminTopologyFuncTest.java   | 43 ++++-----
 .../hadoop/gateway/GatewayAppFuncTest.java      |  2 +-
 .../hadoop/gateway/GatewayBasicFuncTest.java    | 94 +++++++++++---------
 .../hadoop/gateway/GatewayDeployFuncTest.java   |  4 +-
 .../hadoop/gateway/GatewayHealthFuncTest.java   |  4 +-
 .../GatewayLdapDynamicGroupFuncTest.java        |  2 +-
 .../gateway/GatewayLdapGroupFuncTest.java       |  4 +-
 .../gateway/GatewayLdapPosixGroupFuncTest.java  |  2 +-
 .../gateway/GatewayLocalServiceFuncTest.java    |  2 +-
 .../hadoop/gateway/GatewayMultiFuncTest.java    | 16 ++--
 .../GatewayPortMappingDisableFeatureTest.java   |  2 +-
 .../gateway/GatewayPortMappingFailTest.java     |  2 +-
 .../gateway/GatewayPortMappingFuncTest.java     |  2 +-
 .../hadoop/gateway/GatewaySampleFuncTest.java   |  2 +-
 .../apache/hadoop/gateway/Knox242FuncTest.java  |  2 +-
 .../hadoop/gateway/WebHdfsHaFuncTest.java       |  2 +-
 pom.xml                                         | 14 +--
 21 files changed, 102 insertions(+), 135 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-server/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-server/pom.xml b/gateway-server/pom.xml
index 6200bab..437d22d 100644
--- a/gateway-server/pom.xml
+++ b/gateway-server/pom.xml
@@ -271,28 +271,6 @@
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>com.jayway.restassured</groupId>
-            <artifactId>rest-assured</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.jayway.jsonpath</groupId>
-            <artifactId>json-path</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.jayway.jsonpath</groupId>
-            <artifactId>json-path-assert</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.xmlmatchers</groupId>
-            <artifactId>xml-matchers</artifactId>
-            <scope>test</scope>
-        </dependency>
-
         <!-- This must be after restassured otherwise is messes up the hamcrest dependencies.
-->
         <dependency>
             <groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-test/pom.xml b/gateway-test/pom.xml
index d3ad73b..24e894b 100644
--- a/gateway-test/pom.xml
+++ b/gateway-test/pom.xml
@@ -85,20 +85,10 @@
 
 
         <dependency>
-            <groupId>com.jayway.restassured</groupId>
+            <groupId>io.rest-assured</groupId>
             <artifactId>rest-assured</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>com.jayway.jsonpath</groupId>
-            <artifactId>json-path</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.jayway.jsonpath</groupId>
-            <artifactId>json-path-assert</artifactId>
-            <scope>test</scope>
-        </dependency>
 
         <dependency>
             <groupId>org.xmlmatchers</groupId>

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java
index e1b6d2b..2d02966 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/AmbariServiceDefinitionTest.java
@@ -47,7 +47,7 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.UUID;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.notNullValue;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminFuncTest.java
index c19d2ef..ca36248 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminFuncTest.java
@@ -39,7 +39,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.hamcrest.CoreMatchers.notNullValue;
 
 public class GatewayAdminFuncTest {

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminTopologyFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminTopologyFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminTopologyFuncTest.java
index ec02b1f..3a5cd84 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminTopologyFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAdminTopologyFuncTest.java
@@ -29,7 +29,7 @@ import java.util.Map;
 import java.util.UUID;
 import javax.ws.rs.core.MediaType;
 
-import com.jayway.restassured.http.ContentType;
+import io.restassured.http.ContentType;
 import com.mycila.xmltool.XMLDoc;
 import com.mycila.xmltool.XMLTag;
 import org.apache.hadoop.gateway.config.GatewayConfig;
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.containsString;
@@ -277,10 +277,11 @@ public class GatewayAdminTopologyFuncTest {
         //.log().all()
         .statusCode(HttpStatus.SC_OK)
         .contentType(MediaType.APPLICATION_XML)
-        .get(serviceUrl);
+        .when().get(serviceUrl);
 
 
     given().auth().preemptive().basic(username, password)
+        .header("Accept", MediaType.APPLICATION_JSON)
         .expect()
         //.log().all()
         .statusCode(HttpStatus.SC_OK)
@@ -364,6 +365,7 @@ public class GatewayAdminTopologyFuncTest {
     given()
         //.log().all()
         .auth().preemptive().basic(adminUser, adminPass)
+        .header("Accept", MediaType.APPLICATION_JSON)
         .expect()
         //.log().all()
         .statusCode(HttpStatus.SC_OK)
@@ -376,7 +378,7 @@ public class GatewayAdminTopologyFuncTest {
         .body("topologies.topology[1].href", not(nullValue()))
         .body("topologies.topology[0].timestamp", not(nullValue()))
         .body("topologies.topology[1].timestamp", not(nullValue()))
-        .get(url);
+        .when().get(url);
 
     LOG_EXIT();
   }
@@ -395,7 +397,7 @@ public class GatewayAdminTopologyFuncTest {
         .expect()
         //.log().all()
         .statusCode(HttpStatus.SC_FORBIDDEN)
-        .get(url);
+        .when().get(url);
 
     LOG_EXIT();
   }
@@ -534,11 +536,12 @@ public class GatewayAdminTopologyFuncTest {
 
     given()
         .auth().preemptive().basic(username, password)
+        .header("Accept", MediaType.APPLICATION_JSON)
         .expect()
         //.log().all()
         .statusCode(HttpStatus.SC_OK)
         .contentType(MediaType.APPLICATION_JSON)
-        .get(url);
+        .when().get(url);
 
     given()
         .auth().preemptive().basic(username, password)
@@ -546,7 +549,7 @@ public class GatewayAdminTopologyFuncTest {
         //.log().all()
         .statusCode(HttpStatus.SC_OK)
         .contentType(MediaType.APPLICATION_JSON)
-        .delete(url);
+        .when().delete(url);
 
     given()
         //.log().all()
@@ -554,7 +557,7 @@ public class GatewayAdminTopologyFuncTest {
         .expect()
         //.log().all()
         .statusCode(HttpStatus.SC_NO_CONTENT)
-        .get(url);
+        .when().get(url);
 
     LOG_EXIT();
   }
@@ -583,7 +586,7 @@ public class GatewayAdminTopologyFuncTest {
         .expect()
         .statusCode(HttpStatus.SC_OK)
         //.log().all()
-        .put(url).getBody().asString();
+        .when().put(url).getBody().asString();
 
     InputSource source = new InputSource( new StringReader( XML ) );
     Document doc = XmlUtils.readXml( source );
@@ -597,7 +600,7 @@ public class GatewayAdminTopologyFuncTest {
             .expect()
             .statusCode(HttpStatus.SC_OK)
             .body(equalTo(XML))
-            .get(url)
+            .when().get(url)
             .getBody().asString();
 
     String XmlPut =
@@ -616,7 +619,7 @@ public class GatewayAdminTopologyFuncTest {
         .expect()
         .statusCode(HttpStatus.SC_OK)
             //.log().all()
-        .put(url).getBody().asString();
+        .when().put(url).getBody().asString();
 
     given()
         .auth().preemptive().basic(username, password)
@@ -624,7 +627,7 @@ public class GatewayAdminTopologyFuncTest {
         .expect()
         .statusCode(HttpStatus.SC_OK)
         .body(equalTo(JSON))
-        .get(url)
+        .when().get(url)
         .getBody().asString();
 
     LOG_EXIT();
@@ -661,7 +664,7 @@ public class GatewayAdminTopologyFuncTest {
         .body(containsString(newUrl))
         .body(containsString("test-cluster"))
         .body(containsString("admin"))
-        .get(url);
+        .when().get(url);
 
 
 //     Case 2: add in x-forward headers (host, server, proto, context)
@@ -680,7 +683,7 @@ public class GatewayAdminTopologyFuncTest {
         .body(containsString(host))
         .body(containsString("test-cluster"))
         .body(containsString("admin"))
-        .get(url);
+        .when().get(url);
 
 //     Case 3: add in x-forward headers (host, proto, port, context)
     given()
@@ -698,7 +701,7 @@ public class GatewayAdminTopologyFuncTest {
         .body(containsString(proto))
         .body(containsString("test-cluster"))
         .body(containsString("admin"))
-        .get(url);
+        .when().get(url);
 
 //     Case 4: add in x-forward headers (host, proto, port, context) no port in host.
     given()
@@ -716,7 +719,7 @@ public class GatewayAdminTopologyFuncTest {
         .body(containsString(proto))
         .body(containsString("test-cluster"))
         .body(containsString("admin"))
-        .get(url);
+        .when().get(url);
 
 //     Case 5: add in x-forward headers (host, port)
     given()
@@ -730,7 +733,7 @@ public class GatewayAdminTopologyFuncTest {
         .body(containsString(port))
         .body(containsString("test-cluster"))
         .body(containsString("admin"))
-        .get(url);
+        .when().get(url);
 
 //     Case 6: Normal Request
     given()
@@ -741,7 +744,7 @@ public class GatewayAdminTopologyFuncTest {
         .body(containsString(url))
         .body(containsString("test-cluster"))
         .body(containsString("admin"))
-        .get(url);
+        .when().get(url);
 
     LOG_EXIT();
   }
@@ -760,7 +763,7 @@ public class GatewayAdminTopologyFuncTest {
         .expect()
         .statusCode(HttpStatus.SC_OK)
         .body(containsString(url + "/test-cluster"))
-        .get(url);
+        .when().get(url);
 
 
 //     Case 2: Change gateway.path to another String. Ensure HTTP OK resp + valid URL.
@@ -779,7 +782,7 @@ public class GatewayAdminTopologyFuncTest {
          .expect()
          .statusCode(HttpStatus.SC_OK)
          .body(containsString(newUrl + "/test-cluster"))
-         .get(newUrl);
+         .when().get(newUrl);
    } catch(Exception e){
      fail(e.getMessage());
    }

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java
index cd7a9fe..ed44d15 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayAppFuncTest.java
@@ -46,7 +46,7 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.equalTo;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
index 576721d..cbe12a8 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
@@ -35,12 +35,13 @@ import java.util.Map;
 import java.util.Map.Entry;
 import javax.ws.rs.core.MediaType;
 
-import com.jayway.restassured.http.ContentType;
-import com.jayway.restassured.path.json.JsonPath;
-import com.jayway.restassured.response.Cookie;
-import com.jayway.restassured.response.Header;
-import com.jayway.restassured.response.Response;
-import com.jayway.restassured.specification.ResponseSpecification;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.http.Cookie;
+import io.restassured.http.Header;
+import io.restassured.path.json.JsonPath;
+import io.restassured.response.Response;
+import io.restassured.specification.ResponseSpecification;
 import com.mycila.xmltool.XMLDoc;
 import com.mycila.xmltool.XMLTag;
 import org.apache.commons.io.filefilter.WildcardFileFilter;
@@ -85,7 +86,7 @@ import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.*;
@@ -312,12 +313,11 @@ public class GatewayBasicFuncTest {
         .expect()
         //.log().all()
         .statusCode( HttpStatus.SC_OK )
-        .header( "Set-Cookie", containsString( "JSESSIONID" ) )
-        .header( "Set-Cookie", containsString( "HttpOnly" ) )
         .contentType( "application/json" )
         .content( "boolean", is( true ) )
         .when().put( driver.getUrl( "WEBHDFS" ) + "/v1" + root + "/dir" ).getDetailedCookie(
"JSESSIONID" );
     assertThat( cookie.isSecured(), is( true ) );
+    assertThat( cookie.isHttpOnly(), is( true ) );
     assertThat( cookie.getPath(), is( "/gateway/cluster" ) );
     assertThat( cookie.getValue().length(), greaterThan( 16 ) );
     driver.assertComplete();
@@ -427,40 +427,47 @@ public class GatewayBasicFuncTest {
         .queryParam( "recursive", "true" )
         .respond()
         .status( HttpStatus.SC_OK );
-    given()
-        //.log().all()
-        .auth().preemptive().basic( username, password )
-        .header("X-XSRF-Header", "jksdhfkhdsf")
-        .queryParam( "op", "DELETE" )
-        .queryParam( "recursive", "true" )
-        .expect()
-        //.log().all()
-        .statusCode( HttpStatus.SC_OK )
-        .when().delete( driver.getUrl( "WEBHDFS" ) + "/v1/~" + root + ( driver.isUseGateway()
? "" : "?user.name=" + username ) );
-    driver.assertComplete();
 
-    driver.getMock( "WEBHDFS" )
-        .expect()
-        .method( "PUT" )
-        .pathInfo( "/v1/user/hdfs/dir" )
-        .queryParam( "op", "MKDIRS" )
-        .queryParam( "user.name", username )
-        .respond()
-        .status( HttpStatus.SC_OK )
-        .content( driver.getResourceBytes( "webhdfs-success.json" ) )
-        .contentType("application/json");
-    given()
-        //.log().all()
-        .auth().preemptive().basic( username, password )
-        .header("X-XSRF-Header", "jksdhfkhdsf")
-        .queryParam( "op", "MKDIRS" )
-        .expect()
-        //.log().all();
-        .statusCode( HttpStatus.SC_OK )
-        .contentType( "application/json" )
-        .content( "boolean", is( true ) )
-        .when().put( driver.getUrl( "WEBHDFS" ) + "/v1/~/dir" );
-    driver.assertComplete();
+    try {
+      // Need to turn off URL encoding here or otherwise the tilde gets encoded and the rewrite
rules fail
+      RestAssured.urlEncodingEnabled = false;
+      given()
+          //.log().all()
+          .auth().preemptive().basic( username, password )
+          .header("X-XSRF-Header", "jksdhfkhdsf")
+          .queryParam( "op", "DELETE" )
+          .queryParam( "recursive", "true" )
+          .expect()
+          //.log().all()
+          .statusCode( HttpStatus.SC_OK )
+          .when().delete( driver.getUrl( "WEBHDFS" ) + "/v1/~" + root + ( driver.isUseGateway()
? "" : "?user.name=" + username ) );
+      driver.assertComplete();
+
+      driver.getMock( "WEBHDFS" )
+          .expect()
+          .method( "PUT" )
+          .pathInfo( "/v1/user/hdfs/dir" )
+          .queryParam( "op", "MKDIRS" )
+          .queryParam( "user.name", username )
+          .respond()
+          .status( HttpStatus.SC_OK )
+          .content( driver.getResourceBytes( "webhdfs-success.json" ) )
+          .contentType("application/json");
+      given()
+          //.log().all()
+          .auth().preemptive().basic( username, password )
+          .header("X-XSRF-Header", "jksdhfkhdsf")
+          .queryParam( "op", "MKDIRS" )
+          .expect()
+          //.log().all();
+          .statusCode( HttpStatus.SC_OK )
+          .contentType( "application/json" )
+          .content( "boolean", is( true ) )
+          .when().put( driver.getUrl( "WEBHDFS" ) + "/v1/~/dir" );
+      driver.assertComplete();
+    } finally {
+      RestAssured.urlEncodingEnabled = true;
+    }
     LOG_EXIT();
   }
 
@@ -2015,7 +2022,6 @@ public class GatewayBasicFuncTest {
     .expect()
     .method("PUT")
     .pathInfo(scannerPath)
-    .header("Content-Type", ContentType.XML.toString())
     .respond()
     .status(HttpStatus.SC_CREATED);
 
@@ -2023,7 +2029,7 @@ public class GatewayBasicFuncTest {
     .auth().preemptive().basic( username, password )
     .header("X-XSRF-Header", "jksdhfkhdsf")
     .header( "Content-Type", ContentType.XML.toString() )
-    .content( driver.getResourceBytes( scannerDefinitionResourceName + ".xml" ) )
+    .body( driver.getResourceBytes( scannerDefinitionResourceName + ".xml" ) )
     .expect()
     //TODO: Add "Location" header check  when issue with incorrect outbound rewrites will
be resolved
     //.header( "Location", startsWith( driver.getUrl( "WEBHBASE" ) + createScannerPath )
)

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
index c1c0ffa..744fd85 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayDeployFuncTest.java
@@ -17,7 +17,7 @@
  */
 package org.apache.hadoop.gateway;
 
-import com.jayway.restassured.response.Response;
+import io.restassured.response.Response;
 import com.mycila.xmltool.XMLDoc;
 import com.mycila.xmltool.XMLTag;
 import org.apache.commons.io.FileUtils;
@@ -48,7 +48,7 @@ import java.util.Map;
 import java.util.UUID;
 import java.util.regex.Pattern;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.containsString;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayHealthFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayHealthFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayHealthFuncTest.java
index 159b952..84d43b8 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayHealthFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayHealthFuncTest.java
@@ -17,7 +17,7 @@
  */
 package org.apache.hadoop.gateway;
 
-import com.jayway.restassured.path.json.JsonPath;
+import io.restassured.path.json.JsonPath;
 import com.mycila.xmltool.XMLDoc;
 import com.mycila.xmltool.XMLTag;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
@@ -46,7 +46,7 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.UUID;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.hamcrest.CoreMatchers.notNullValue;
 
 public class GatewayHealthFuncTest {

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
index 2b5f0df..5567321 100755
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
@@ -17,7 +17,7 @@
  */
 package org.apache.hadoop.gateway;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
index 66cb311..68b9b5e 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
@@ -17,7 +17,7 @@
  */
 package org.apache.hadoop.gateway;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;
@@ -150,7 +150,7 @@ public class GatewayLdapGroupFuncTest {
     AliasService aliasService = (AliasService)services.getService(GatewayServices.ALIAS_SERVICE);
     aliasService.addAliasForCluster("test-cluster", "ldcSystemPassword", "guest-password");
 
-    char[] password1 = aliasService.getPasswordFromAliasForCluster( "test-cluster", "ldcSystemPassword");
+    // char[] password1 = aliasService.getPasswordFromAliasForCluster( "test-cluster", "ldcSystemPassword");
     //System.err.println("SETUP password 10: " + ((password1 == null) ? "NULL" : new String(password1)));
 
     File descriptor = new File( topoDir, "test-cluster.xml" );

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapPosixGroupFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapPosixGroupFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapPosixGroupFuncTest.java
index 6ca0c15..42674e8 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapPosixGroupFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapPosixGroupFuncTest.java
@@ -47,7 +47,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
index 613eea7..dff3182 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
@@ -41,7 +41,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
index 67852b9..2c2371f 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
@@ -59,7 +59,7 @@ import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.endsWith;
@@ -186,7 +186,7 @@ public class GatewayMultiFuncTest {
         //.log().all()
         .statusCode( HttpStatus.SC_OK )
         .contentType( "application/json; charset=UTF-8" )
-        .when().log().ifError().get( gatewayUrl + "/knox678/repeat" ).andReturn().asString();
+        .when().get( gatewayUrl + "/knox678/repeat" ).andReturn().asString();
     assertThat( json, is("{\"msg\":\"H\u00eallo\"}") );
     assertThat( mock.isEmpty(), is(true) );
 
@@ -199,7 +199,7 @@ public class GatewayMultiFuncTest {
         //.log().all()
         .statusCode( HttpStatus.SC_OK )
         .contentType( "application/octet-stream" )
-        .when().log().ifError().get( gatewayUrl + "/knox678/repeat" ).andReturn().asByteArray();
+        .when().get( gatewayUrl + "/knox678/repeat" ).andReturn().asByteArray();
     assertThat( bytes, is(equalTo("H\u00eallo".getBytes())) );
     assertThat( mock.isEmpty(), is(true) );
 
@@ -324,7 +324,7 @@ public class GatewayMultiFuncTest {
         .statusCode( HttpStatus.SC_OK )
         .contentType( "text/plain" )
         .body( is( "test-service-response" ) )
-        .when().log().ifError().get( gatewayUrl + "/knox694-1/test-service-path/test-resource-path"
);
+        .when().get( gatewayUrl + "/knox694-1/test-service-path/test-resource-path" );
     given()
         //.log().all()
         .auth().preemptive().basic( uname, invalidPword )
@@ -346,7 +346,7 @@ public class GatewayMultiFuncTest {
         .statusCode( HttpStatus.SC_OK )
         .contentType( "text/plain" )
         .body( is( "test-service-response" ) )
-        .when().log().ifError().get( gatewayUrl + "/knox694-2/test-service-path/test-resource-path"
);
+        .when().get( gatewayUrl + "/knox694-2/test-service-path/test-resource-path" );
     given()
         //.log().all()
         .auth().preemptive().basic( uname, invalidPword )
@@ -368,7 +368,7 @@ public class GatewayMultiFuncTest {
         .statusCode( HttpStatus.SC_OK )
         .contentType( "text/plain" )
         .body( is( "test-service-response" ) )
-        .when().log().ifError().get( gatewayUrl + "/knox694-3/test-service-path/test-resource-path"
);
+        .when().get( gatewayUrl + "/knox694-3/test-service-path/test-resource-path" );
     given()
         //.log().all()
         .auth().preemptive().basic( uname, invalidPword )
@@ -390,7 +390,7 @@ public class GatewayMultiFuncTest {
         .statusCode( HttpStatus.SC_OK )
         .contentType( "text/plain" )
         .body( is( "test-service-response" ) )
-        .when().log().ifError().get( gatewayUrl + "/knox694-4/test-service-path/test-resource-path"
);
+        .when().get( gatewayUrl + "/knox694-4/test-service-path/test-resource-path" );
     given()
         //.log().all()
         .auth().preemptive().basic( uname, invalidPword )
@@ -412,7 +412,7 @@ public class GatewayMultiFuncTest {
         .statusCode( HttpStatus.SC_OK )
         .contentType( "text/plain" )
         .body( is( "test-service-response" ) )
-        .when().log().ifError().get( gatewayUrl + "/knox694-5/test-service-path/test-resource-path"
);
+        .when().get( gatewayUrl + "/knox694-5/test-service-path/test-resource-path" );
     given()
         //.log().all()
         .auth().preemptive().basic( uname, invalidPword )

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingDisableFeatureTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingDisableFeatureTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingDisableFeatureTest.java
index 094d984..f5b6f78 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingDisableFeatureTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingDisableFeatureTest.java
@@ -35,7 +35,7 @@ import java.io.IOException;
 import java.net.ConnectException;
 import java.util.concurrent.ConcurrentHashMap;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFailTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFailTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFailTest.java
index a8ed307..c4e7794 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFailTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFailTest.java
@@ -30,7 +30,7 @@ import org.junit.experimental.categories.Category;
 import java.io.IOException;
 import java.util.concurrent.ConcurrentHashMap;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFuncTest.java
index 0f7cc68..a8199d1 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayPortMappingFuncTest.java
@@ -32,7 +32,7 @@ import org.junit.experimental.categories.Category;
 import java.io.IOException;
 import java.util.concurrent.ConcurrentHashMap;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
index 5e71be2..9e66887 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
@@ -40,7 +40,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/Knox242FuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/Knox242FuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/Knox242FuncTest.java
index 4745640..7026407 100755
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/Knox242FuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/Knox242FuncTest.java
@@ -17,7 +17,7 @@
  */
 package org.apache.hadoop.gateway;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/gateway-test/src/test/java/org/apache/hadoop/gateway/WebHdfsHaFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/WebHdfsHaFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/WebHdfsHaFuncTest.java
index 32aa11d..2f4574f 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/WebHdfsHaFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/WebHdfsHaFuncTest.java
@@ -31,7 +31,7 @@ import org.junit.experimental.categories.Category;
 
 import java.io.IOException;
 
-import static com.jayway.restassured.RestAssured.given;
+import static io.restassured.RestAssured.given;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;

http://git-wip-us.apache.org/repos/asf/knox/blob/e2e12514/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 71abc92..d2f4176 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1253,20 +1253,10 @@
 
             <!-- JUnit must be before Junit otherwise it is messes up the hamcrest dependencies
-->
             <dependency>
-                <groupId>com.jayway.restassured</groupId>
+                <groupId>io.rest-assured</groupId>
                 <artifactId>rest-assured</artifactId>
-                <version>1.8.1</version>
+                <version>3.0.3</version>
                 <scope>test</scope>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.codehaus.jackson</groupId>
-                        <artifactId>jackson-core-asl</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.codehaus.jackson</groupId>
-                        <artifactId>jackson-mapper-asl</artifactId>
-                    </exclusion>
-                </exclusions>
             </dependency>
 
             <dependency>


Mime
View raw message