Fixed two tests that now need to authenticate. Added 'statstore, storename'

command to avm.jsp doohickey.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3775 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-12 19:56:52 +00:00
parent 39a18df7f2
commit d5294a4879
2 changed files with 22 additions and 10 deletions

View File

@@ -33,6 +33,7 @@ import java.util.TreeMap;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.avm.util.BulkLoader;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.transaction.TransactionUtil;
import org.alfresco.service.cmr.avm.AVMException;
import org.alfresco.service.cmr.avm.AVMExistsException;
@@ -2276,6 +2277,8 @@ public class AVMServiceTest extends AVMServiceTestBase
{
setupBasicTree();
PermissionService perm = (PermissionService)fContext.getBean("PermissionService");
AuthenticationComponent ac = (AuthenticationComponent)fContext.getBean("authenticationComponent");
ac.authenticate("admin", "admin".toCharArray());
perm.setPermission(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c/foo"),
PermissionService.ADMINISTRATOR_AUTHORITY,
PermissionService.ALL_PERMISSIONS,
@@ -2306,6 +2309,8 @@ public class AVMServiceTest extends AVMServiceTestBase
{
setupBasicTree();
FileFolderService ffs = (FileFolderService)fContext.getBean("FileFolderService");
AuthenticationComponent ac = (AuthenticationComponent)fContext.getBean("authenticationComponent");
ac.authenticate("admin", "admin".toCharArray());
assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c"),
"banana", ContentModel.TYPE_AVM_PLAIN_CONTENT) != null);
assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c"),