Merged V3.1 to HEAD

13256: Fix ETHREEOH-1221   Hard-coded use of "admin" username
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.1:r13256


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13613 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-12 21:48:15 +00:00
parent ae58306cf9
commit 198ebe371e
48 changed files with 461 additions and 368 deletions

View File

@@ -59,7 +59,6 @@ public class MessageServiceImplTest extends TestCase implements MessageDeployer
* Test user details
*/
private static final String PWD = "admin";
private static final String USER_NAME = "admin";
/**
* Test store ref
@@ -92,14 +91,14 @@ public class MessageServiceImplTest extends TestCase implements MessageDeployer
// Get a reference to the root node
NodeRef rootNodeRef = this.nodeService.getRootNode(this.testStoreRef);
// Create an authenticate the user
if(!authenticationService.authenticationExists(USER_NAME))
// Create and authenticate the user
if(!authenticationService.authenticationExists(AuthenticationUtil.getAdminUserName()))
{
authenticationService.createAuthentication(USER_NAME, PWD.toCharArray());
authenticationService.createAuthentication(AuthenticationUtil.getAdminUserName(), PWD.toCharArray());
}
// Authenticate - as admin
authenticationService.authenticate(USER_NAME, PWD.toCharArray());
authenticationService.authenticate(AuthenticationUtil.getAdminUserName(), PWD.toCharArray());
// Store test messages in repo
String pattern = "classpath*:" + BASE_RESOURCE_CLASSPATH + BASE_BUNDLE_NAME + "*";