java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.xpn.xwiki.test.HibernateTestCase
com.xpn.xwiki.test.LDAPTest
- All Implemented Interfaces:
- junit.framework.Test
- public class LDAPTest
- extends HibernateTestCase
Test for LDAP authentication
***********************************************************************
This test need a TEST local LDAP server
***********************************************************************
BEWARE : THIS TEST DELETE ALL LDAP SERVER CONTENTS !
NEVER USE IT WITH PRODUCTION SERVER !
***********************************************************************
If you use OpenLDAP server, the sldap.conf must containts the statements :
include /etc/schema/cosine.schema
include /etc/schema/inetorgperson.schema
access to *
by self read
by anonymous auth
by * none
suffix "dc=xwiki,dc=com"
rootdn "cn=Manager,dc=xwiki,dc=com"
rootpw secret
Other default values should work
Test works with out of the box ldap database.
|
Field Summary |
static boolean |
inTest
|
| Fields inherited from class junit.framework.TestCase |
|
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
inTest
public static boolean inTest
LDAPTest
public LDAPTest()
setUp
public void setUp()
throws java.lang.Exception
- Description copied from class:
junit.framework.TestCase
- Sets up the fixture, for example, open a network connection.
This method is called before a test is executed.
- Overrides:
setUp in class HibernateTestCase
prepareLDAP
public void prepareLDAP(boolean addUser,
java.lang.String userPassword)
prepareData
public void prepareData(boolean withLDAPDN,
boolean withpassword)
throws com.xpn.xwiki.XWikiException
testCheckLogonWithBind
public void testCheckLogonWithBind()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testCheckLogonWithoutBind
public void testCheckLogonWithoutBind()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testCheckLogonWithUserBind
public void testCheckLogonWithUserBind()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testCheckLogonWithBadBind
public void testCheckLogonWithBadBind()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testCheckLogonFromWiki
public void testCheckLogonFromWiki()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testCheckLogonFromWikiBadLDAP
public void testCheckLogonFromWikiBadLDAP()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testCheckLogonKOFromWikiPassword
public void testCheckLogonKOFromWikiPassword()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testCheckLogonLevel
public void testCheckLogonLevel()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
com.xpn.xwiki.XWikiException
testTransfertUserFromLDAP
public void testTransfertUserFromLDAP()
throws java.lang.ClassNotFoundException,
com.xpn.xwiki.XWikiException,
java.lang.IllegalAccessException,
java.lang.InstantiationException