mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-3074: Fixup community integration tests
This commit is contained in:
@@ -44,14 +44,14 @@ public class RM1429Test extends DeleteHoldTest
|
||||
{
|
||||
public void testDeleteHoldWithoutPermissionsOnChildren()
|
||||
{
|
||||
// Create the test hold
|
||||
final NodeRef hold = createAndCheckHold();
|
||||
|
||||
doTestInTransaction(new Test<Void>()
|
||||
final NodeRef hold = doTestInTransaction(new Test<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public Void run()
|
||||
public NodeRef run()
|
||||
{
|
||||
// Create the test hold
|
||||
NodeRef hold = createAndCheckHold();
|
||||
|
||||
// Add the user to the RM Manager role
|
||||
filePlanRoleService.assignRoleToAuthority(filePlan, FilePlanRoleService.ROLE_RECORDS_MANAGER, userName);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class RM1429Test extends DeleteHoldTest
|
||||
// Add record folder to the hold
|
||||
holdService.addToHold(hold, rmFolder);
|
||||
|
||||
return null;
|
||||
return hold;
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -44,14 +44,14 @@ public class RM1463Test extends DeleteHoldTest
|
||||
{
|
||||
public void testAddRecordFolderToHoldWithoutFilingPermissionOnRecordFolder()
|
||||
{
|
||||
// Create hold
|
||||
final NodeRef hold = createAndCheckHold();
|
||||
|
||||
doTestInTransaction(new Test<Void>()
|
||||
final NodeRef hold = doTestInTransaction(new Test<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public Void run()
|
||||
public NodeRef run()
|
||||
{
|
||||
// Create hold
|
||||
NodeRef hold = createAndCheckHold();
|
||||
|
||||
// Add the user to the RM Manager role
|
||||
filePlanRoleService.assignRoleToAuthority(filePlan, FilePlanRoleService.ROLE_RECORDS_MANAGER, userName);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class RM1463Test extends DeleteHoldTest
|
||||
// Give the user only read permissions on the record folder
|
||||
permissionService.setPermission(rmFolder, userName, RMPermissionModel.READ_RECORDS, true);
|
||||
|
||||
return null;
|
||||
return hold;
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -44,14 +44,14 @@ public class RM1464Test extends DeleteHoldTest
|
||||
{
|
||||
public void testAddRecordFolderToHoldWithoutFilingPermissionOnHold()
|
||||
{
|
||||
// Create hold
|
||||
final NodeRef hold = createAndCheckHold();
|
||||
|
||||
doTestInTransaction(new Test<Void>()
|
||||
final NodeRef hold = doTestInTransaction(new Test<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public Void run()
|
||||
public NodeRef run()
|
||||
{
|
||||
// Create hold
|
||||
NodeRef hold = createAndCheckHold();
|
||||
|
||||
// Add the user to the RM Manager role
|
||||
filePlanRoleService.assignRoleToAuthority(filePlan, FilePlanRoleService.ROLE_RECORDS_MANAGER, userName);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class RM1464Test extends DeleteHoldTest
|
||||
// Give the user filing permissions on the record folder
|
||||
permissionService.setPermission(rmFolder, userName, RMPermissionModel.FILING, true);
|
||||
|
||||
return null;
|
||||
return hold;
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -80,8 +80,17 @@ public class RM1727Test extends BaseRMTestCase
|
||||
|
||||
public void testRM1727()
|
||||
{
|
||||
//set read and file permissions for folder
|
||||
filePlanPermissionService.setPermission(folder, myUser, RMPermissionModel.FILING);
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void run()
|
||||
{
|
||||
//set read and file permissions for folder
|
||||
filePlanPermissionService.setPermission(folder, myUser, RMPermissionModel.FILING);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
@Override
|
||||
|
@@ -30,6 +30,7 @@ package org.alfresco.module.org_alfresco_module_rm.test.legacy.action;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.impl.FileReportAction;
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -62,6 +63,8 @@ public class FileReportActionTest extends BaseRMTestCase
|
||||
|
||||
private void fileReport(final String mimeType)
|
||||
{
|
||||
AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser();
|
||||
|
||||
// create record folder
|
||||
final NodeRef recordFolder = recordFolderService.createRecordFolder(rmContainer, GUID.generate());
|
||||
|
||||
|
@@ -245,8 +245,15 @@ public class FileToActionTest extends BaseRMTestCase
|
||||
}
|
||||
}, ADMIN_USER);
|
||||
|
||||
// execute file-to action
|
||||
rmActionService.executeRecordsManagementAction(dmDocument, FileToAction.NAME, params);
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
public Void run() throws Exception
|
||||
{
|
||||
// execute file-to action
|
||||
rmActionService.executeRecordsManagementAction(dmDocument, FileToAction.NAME, params);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
|
Reference in New Issue
Block a user