directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1043275 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
Date Wed, 08 Dec 2010 01:57:51 GMT
Author: elecharny
Date: Wed Dec  8 01:57:50 2010
New Revision: 1043275

URL: http://svn.apache.org/viewvc?rev=1043275&view=rev
Log:
A fix for a test, using correctly the PrincipalName and KerberosPrincipal

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java?rev=1043275&r1=1043274&r2=1043275&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
Wed Dec  8 01:57:50 2010
@@ -899,11 +899,11 @@ public class AuthenticationServiceTest e
     @Test
     public void testInitialServiceTicket() throws Exception
     {
-        String servicePrincipalName = "ldap/ldap.example.com@EXAMPLE.COM";
+        KerberosPrincipal servicePrincipalName = new KerberosPrincipal( "ldap/ldap.example.com@EXAMPLE.COM"
);
 
         KdcReqBody kdcReqBody = new KdcReqBody();
         kdcReqBody.setCName( getPrincipalName( "hnelson" ) );
-        kdcReqBody.setSName( getPrincipalName( servicePrincipalName ) );
+        kdcReqBody.setSName( new PrincipalName( servicePrincipalName ) );
         kdcReqBody.setRealm( "EXAMPLE.COM" );
         kdcReqBody.setEType( config.getEncryptionTypes() );
 
@@ -937,8 +937,8 @@ public class AuthenticationServiceTest e
         assertTrue( "INITIAL flag", reply.getTicket().getEncTicketPart().getFlags().isInitial()
);
         assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid()
);
 
-        assertEquals( "Service principal name", reply.getSName().getNameString(), servicePrincipalName
);
-        assertEquals( "Service principal name", reply.getTicket().getSName().getNames(),
servicePrincipalName );
+        assertEquals( "Service principal name", "ldap/ldap.example.com", reply.getSName().getNameString()
);
+        assertEquals( "Service principal name", "ldap/ldap.example.com", reply.getTicket().getSName().getNameString()
);
     }
 
 



Mime
View raw message