knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dillido...@apache.org
Subject [2/3] git commit: KNOX-373: add unit tests to verify default values for userSearchBase, groupSearchBase
Date Thu, 15 May 2014 02:21:33 GMT
KNOX-373: add unit tests to verify default values for userSearchBase, groupSearchBase


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

Branch: refs/heads/master
Commit: 4db63daf4e554ce848f372b98bb033e0032e5cd2
Parents: b1179de
Author: Dilli Dorai Arumugam <darumugam@hortonworks.com>
Authored: Wed May 14 17:58:59 2014 -0700
Committer: Dilli Dorai Arumugam <darumugam@hortonworks.com>
Committed: Wed May 14 17:58:59 2014 -0700

----------------------------------------------------------------------
 .../hadoop/gateway/shirorealm/KnoxLdapRealmTest.java | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/4db63daf/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealmTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealmTest.java
b/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealmTest.java
index f9e69a8..cea8cca 100644
--- a/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealmTest.java
+++ b/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealmTest.java
@@ -62,6 +62,7 @@ public class KnoxLdapRealmTest {
   @Test
   public void setGetUserSearchBase() {
     KnoxLdapRealm realm = new KnoxLdapRealm();
+    realm.setSearchBase("dc=example,dc=com");
     realm.setUserSearchBase("dc=knox,dc=example,dc=com");
     assertEquals(realm.getUserSearchBase(), "dc=knox,dc=example,dc=com");
   }
@@ -69,6 +70,7 @@ public class KnoxLdapRealmTest {
   @Test
   public void setGetGroupSearchBase() {
     KnoxLdapRealm realm = new KnoxLdapRealm();
+    realm.setSearchBase("dc=example,dc=com");
     realm.setGroupSearchBase("dc=knox,dc=example,dc=com");
     assertEquals(realm.getGroupSearchBase(), "dc=knox,dc=example,dc=com");
   }
@@ -85,5 +87,18 @@ public class KnoxLdapRealmTest {
     assertEquals(realm.getUserObjectClass(), "person");
   }
   
+  @Test
+  public void verifyDefaultUserSearchBase() {
+    KnoxLdapRealm realm = new KnoxLdapRealm();
+    realm.setSearchBase("dc=knox,dc=example,dc=com");
+    assertEquals(realm.getUserSearchBase(), "dc=knox,dc=example,dc=com");
+  }
+  
+  @Test
+  public void verifyDefaultGroupSearchBase() {
+    KnoxLdapRealm realm = new KnoxLdapRealm();
+    realm.setSearchBase("dc=knox,dc=example,dc=com");
+    assertEquals(realm.getGroupSearchBase(), "dc=knox,dc=example,dc=com");
+  }
   
 }


Mime
View raw message