mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
TAS-939 getSiteContainers status code 401 with Manager role
This commit is contained in:
@@ -36,6 +36,7 @@ public class GetSiteContainersSanityTests extends RestTest
|
||||
private UserModel adminUserModel;
|
||||
private SiteModel siteModel;
|
||||
private HashMap<UserRole, UserModel> usersWithRoles;
|
||||
private UserModel userModel;
|
||||
|
||||
@BeforeClass
|
||||
public void initTest() throws Exception
|
||||
@@ -91,4 +92,16 @@ public class GetSiteContainersSanityTests extends RestTest
|
||||
siteAPI.getSiteContainers(siteModel.getId());
|
||||
siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK.toString());
|
||||
}
|
||||
|
||||
@TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Failed authentication get site containers call returns status code 401 with Manager role")
|
||||
public void getSiteContainersWithManagerRoleFailedAuth() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
userModel = dataUser.createRandomTestUser();
|
||||
userModel.setPassword("user wrong password");
|
||||
dataUser.addUserToSite(userModel, siteModel, UserRole.SiteManager);
|
||||
restClient.authenticateUser(userModel);
|
||||
siteAPI.getSiteContainers(siteModel.getId());
|
||||
siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user