You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/01/03 16:51:25 UTC
svn commit: r895424 -
/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
Author: kayyagari
Date: Sun Jan 3 15:51:24 2010
New Revision: 895424
URL: http://svn.apache.org/viewvc?rev=895424&view=rev
Log:
fixed testGssSpnegoBind
Modified:
directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=895424&r1=895423&r2=895424&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java Sun Jan 3 15:51:24 2010
@@ -62,7 +62,6 @@
import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.util.ArrayUtils;
-import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
@@ -449,7 +448,14 @@
@Test
public void testGssSpnegoBind() throws Exception
{
- BogusNtlmProvider provider = getNtlmProviderUsingReflection();
+ BogusNtlmProvider provider = new BogusNtlmProvider();
+
+ // the provider configured in @CreateLdapServer only sets for the NTLM mechanism
+ // but we use the same NtlmMechanismHandler class for GSS_SPNEGO too but this is a separate
+ // instance, so we need to set the provider in the NtlmMechanismHandler instance of GSS_SPNEGO mechanism
+ NtlmMechanismHandler ntlmHandler = ( NtlmMechanismHandler ) ldapServer.getSaslMechanismHandlers().get( SupportedSaslMechanisms.GSS_SPNEGO );
+ ntlmHandler.setNtlmProvider( provider );
+
NtlmSaslBindClient client = new NtlmSaslBindClient( SupportedSaslMechanisms.GSS_SPNEGO );
InternalBindResponse type2response = client.bindType1( "type1_test".getBytes() );
assertEquals( 1, type2response.getMessageId() );