mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
PRODENG-276: Fixed test failures.
This commit is contained in:
@@ -45,7 +45,6 @@ import org.junit.runners.Suite;
|
||||
org.alfresco.repo.security.authority.DuplicateAuthorityTest.class,
|
||||
org.alfresco.repo.security.authority.ExtendedPermissionServiceTest.class,
|
||||
org.alfresco.repo.security.permissions.dynamic.LockOwnerDynamicAuthorityTest.class,
|
||||
org.alfresco.repo.security.permissions.dynamic.ServiceAccountRoleTest.class,
|
||||
org.alfresco.repo.security.permissions.impl.AclDaoComponentTest.class,
|
||||
org.alfresco.repo.security.permissions.impl.PermissionServiceTest.class,
|
||||
org.alfresco.repo.security.permissions.impl.acegi.ACLEntryAfterInvocationTest.class,
|
||||
@@ -86,6 +85,7 @@ import org.junit.runners.Suite;
|
||||
org.alfresco.repo.model.ModelTestSuite.class,
|
||||
org.alfresco.repo.tenant.MultiTNodeServiceInterceptorTest.class,
|
||||
org.alfresco.repo.transfer.RepoTransferReceiverImplTest.class,
|
||||
org.alfresco.repo.security.permissions.dynamic.ServiceAccountRoleTest.class
|
||||
})
|
||||
public class AppContext05TestSuite
|
||||
{
|
||||
|
@@ -83,6 +83,8 @@ import org.springframework.context.ApplicationContext;
|
||||
*
|
||||
* @author Jamal Kaabi-Mofrad
|
||||
*/
|
||||
// Ignore the PMD warning about having too many test methods in this class; it makes the tests easier to read and maintain.
|
||||
@SuppressWarnings("PMD.TooManyMethods")
|
||||
public class ServiceAccountRoleTest
|
||||
{
|
||||
// Rule to initialise the default Alfresco spring configuration
|
||||
|
@@ -66,6 +66,8 @@ import org.springframework.context.ApplicationContext;
|
||||
|
||||
public abstract class AbstractPermissionTest extends TestCase
|
||||
{
|
||||
public static final int NUMBER_OF_GLOBAL_PERMISSIONS = 8;
|
||||
|
||||
protected static final String USER2_LEMUR = "lemur";
|
||||
|
||||
protected static final String USER1_ANDY = "andy";
|
||||
|
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.security.permissions.impl.model;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -94,7 +94,7 @@ public class PermissionModelTest extends AbstractPermissionTest
|
||||
Set<PermissionReference> grantees = permissionModelDAO.getGranteePermissions(SimplePermissionReference.getPermissionReference(QName.createQName("cm", "cmobject",
|
||||
namespacePrefixResolver), "Coordinator"));
|
||||
|
||||
assertEquals(69, grantees.size());
|
||||
assertEquals(72, grantees.size());
|
||||
}
|
||||
|
||||
public void testIncludePermissionGroups6()
|
||||
@@ -109,17 +109,17 @@ public class PermissionModelTest extends AbstractPermissionTest
|
||||
{
|
||||
Set<PermissionReference> granters = permissionModelDAO.getGrantingPermissions(SimplePermissionReference.getPermissionReference(QName.createQName("sys", "base",
|
||||
namespacePrefixResolver), "ReadProperties"));
|
||||
assertEquals(14, granters.size());
|
||||
assertEquals(17, granters.size());
|
||||
|
||||
granters = permissionModelDAO.getGrantingPermissions(SimplePermissionReference.getPermissionReference(QName.createQName("sys", "base", namespacePrefixResolver),
|
||||
"_ReadProperties"));
|
||||
assertEquals(15, granters.size());
|
||||
assertEquals(18, granters.size());
|
||||
}
|
||||
|
||||
public void testGlobalPermissions()
|
||||
{
|
||||
Set<? extends PermissionEntry> globalPermissions = permissionModelDAO.getGlobalPermissionEntries();
|
||||
assertEquals(5, globalPermissions.size());
|
||||
assertEquals(NUMBER_OF_GLOBAL_PERMISSIONS, globalPermissions.size());
|
||||
}
|
||||
|
||||
public void testRequiredPermissions()
|
||||
|
Reference in New Issue
Block a user