knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] knox git commit: KNOX-1044 - Change Rest Assured "expect" to "then"
Date Fri, 15 Sep 2017 09:03:01 GMT
Repository: knox
Updated Branches:
  refs/heads/master aac2054c8 -> 4978951cc


http://git-wip-us.apache.org/repos/asf/knox/blob/4978951c/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 1fc8c33..e2d679b 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
@@ -171,7 +171,7 @@ public class WebHdfsHaFuncTest {
             .auth().preemptive().basic(username, password)
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "LISTSTATUS")
-            .expect()
+            .then()
             .log().ifError()
             .statusCode(HttpStatus.SC_OK)
             .body("FileStatuses.FileStatus[0].pathSuffix", is("app-logs"))
@@ -186,7 +186,7 @@ public class WebHdfsHaFuncTest {
       LOG_ENTER();
       String username = "hdfs";
       String password = "hdfs-password";
-      //Shutdown master and expect standby to serve the list response
+      //Shutdown master and then standby to serve the list response
       masterServer.stop();
       standbyServer.expect()
             .method("GET")
@@ -201,7 +201,7 @@ public class WebHdfsHaFuncTest {
             .auth().preemptive().basic(username, password)
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "LISTSTATUS")
-            .expect()
+            .then()
             .log().ifError()
             .statusCode(HttpStatus.SC_OK)
             .body("FileStatuses.FileStatus[0].pathSuffix", is("app-logs"))
@@ -216,14 +216,14 @@ public class WebHdfsHaFuncTest {
       LOG_ENTER();
       String username = "hdfs";
       String password = "hdfs-password";
-      //Shutdown master and expect standby to serve the list response
+      //Shutdown master and then standby to serve the list response
       masterServer.stop();
       standbyServer.stop();
       given()
             .auth().preemptive().basic(username, password)
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "LISTSTATUS")
-            .expect()
+            .then()
 //            .log().ifError()
             .statusCode(HttpStatus.SC_INTERNAL_SERVER_ERROR)
             .when().get(driver.getUrl("WEBHDFS") + "/v1/");
@@ -263,7 +263,7 @@ public class WebHdfsHaFuncTest {
             .auth().preemptive().basic(username, password)
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "LISTSTATUS")
-            .expect()
+            .then()
             .log().ifError()
             .statusCode(HttpStatus.SC_OK)
             .body("FileStatuses.FileStatus[0].pathSuffix", is("app-logs"))
@@ -319,7 +319,7 @@ public class WebHdfsHaFuncTest {
             .auth().preemptive().basic(username, password)
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "LISTSTATUS")
-            .expect()
+            .then()
 //            .log().ifError()
             .statusCode(HttpStatus.SC_INTERNAL_SERVER_ERROR)
             .when().get(driver.getUrl("WEBHDFS") + "/v1/");
@@ -359,7 +359,7 @@ public class WebHdfsHaFuncTest {
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "RENAME")
             .queryParam("destination", "/user/hdfs/foo.txt")
-            .expect()
+            .then()
             .log().ifError()
             .statusCode(HttpStatus.SC_OK)
             .body("boolean", is(true))
@@ -396,7 +396,7 @@ public class WebHdfsHaFuncTest {
             .auth().preemptive().basic(username, password)
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "MKDIRS")
-            .expect()
+            .then()
             .log().ifError()
             .statusCode(HttpStatus.SC_OK)
             .body("boolean", is(true))
@@ -456,7 +456,7 @@ public class WebHdfsHaFuncTest {
             .header("X-XSRF-Header", "jksdhfkhdsf")
             .queryParam("op", "RENAME")
             .queryParam("destination", "/user/hdfs/foo.txt")
-            .expect()
+            .then()
 //            .log().ifError()
             .statusCode(HttpStatus.SC_INTERNAL_SERVER_ERROR)
             .when().post(driver.getUrl("WEBHDFS") + "/v1/user/hdfs/foo.txt");


Mime
View raw message