falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rag...@apache.org
Subject incubator-falcon git commit: FALCON-879 Update ACL tests according to info provided in FALCON-864. Contributed by Raghav Kumar Gautam
Date Sun, 09 Nov 2014 03:42:10 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 394055a54 -> 263046924


FALCON-879 Update ACL tests according to info provided in FALCON-864. Contributed by Raghav
Kumar Gautam


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

Branch: refs/heads/master
Commit: 263046924caf3d7c63ee6f74c7fc8b5e94ac7609
Parents: 394055a
Author: Raghav Kumar Gautam <raghav@apache.org>
Authored: Sat Nov 8 19:42:02 2014 -0800
Committer: Raghav Kumar Gautam <raghav@apache.org>
Committed: Sat Nov 8 19:42:02 2014 -0800

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                           |  3 +++
 .../apache/falcon/regression/core/util/AssertUtil.java  | 12 ++++++++++++
 .../falcon/regression/security/AclValidationTest.java   |  3 +--
 .../falcon/regression/security/ClusterAclTest.java      |  2 +-
 4 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/26304692/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 0136a27..e4153a1 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -138,6 +138,9 @@ Trunk (Unreleased)
 
   BUG FIXES
 
+   FALCON-879 Update ACL tests according to info provided in FALCON-864
+   (Raghav Kumar Gautam)
+
    FALCON-876 Reducing fail time for HCatProcessTest and
    PrismFeedReplicationUpdateTest (Raghav Kumar Gautam)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/26304692/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
index 3384af0..6983212 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
@@ -263,6 +263,18 @@ public final class AssertUtil {
     }
 
     /**
+     * Checks that ServiceResponse status is status FAILED with status code 403.
+     *
+     * @param response ServiceResponse
+     * @throws JAXBException
+     */
+    public static void assertFailedWith403(ServiceResponse response) throws JAXBException
{
+        Assert.assertNotEquals(response.getMessage(), "null", "response message should not
be null");
+
+        Assert.assertEquals(Util.parseResponse(response).getStatus(), APIResult.Status.FAILED);
+        Assert.assertEquals(Util.parseResponse(response).getStatusCode(), 403);
+    }
+    /**
      * Checks that status of some entity job is equal to expected. Method can wait
      * 100 seconds for expected status.
      *

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/26304692/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/AclValidationTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/AclValidationTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/AclValidationTest.java
index d0568d7..6e1855b 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/AclValidationTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/AclValidationTest.java
@@ -129,8 +129,7 @@ public class AclValidationTest extends BaseTestClass {
     @DataProvider(name = "generateUserAndGroup")
     public Object[][] generateUserAndGroup() {
         return new Object[][] {
-            {MerlinConstants.USER2_NAME, MerlinConstants.CURRENT_USER_GROUP},
-            {MerlinConstants.CURRENT_USER_NAME, MerlinConstants.DIFFERENT_USER_NAME},
+            {MerlinConstants.CURRENT_USER_NAME, MerlinConstants.DIFFERENT_USER_GROUP},
             {MerlinConstants.CURRENT_USER_NAME, "nonexistinggroup"},
             {"nonexistinguser", MerlinConstants.CURRENT_USER_GROUP},
         };

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/26304692/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
index 74d9ccb..4bf5808 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
@@ -124,7 +124,7 @@ public class ClusterAclTest extends BaseTestClass {
         if(deleteAllowed) {
             AssertUtil.assertSucceeded(response);
         } else {
-            AssertUtil.assertFailed(response);
+            AssertUtil.assertFailedWith403(response);
         }
     }
 


Mime
View raw message