mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Merge branch 'master' of gitlab.alfresco.com:tas/alfresco-tas-restapi-test
This commit is contained in:
@@ -79,9 +79,9 @@ public class RestGetNetworkForPersonSanityTests extends RestTest
|
||||
{
|
||||
UserModel secondAdminTenantUser = UserModel.getAdminTenantUser();
|
||||
tenantApi.createTenant(secondAdminTenantUser);
|
||||
tenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("anotherTenant");
|
||||
UserModel secondTenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("anotherTenant");
|
||||
restClient.authenticateUser(adminTenantUser);
|
||||
networkApi.getNetworkForUser(tenantUser);
|
||||
networkApi.getNetworkForUser(secondTenantUser);
|
||||
networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ public class RestGetNetworksForPersonSanityTests extends RestTest
|
||||
{
|
||||
UserModel secondAdminTenantUser = UserModel.getAdminTenantUser();
|
||||
tenantApi.createTenant(secondAdminTenantUser);
|
||||
tenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("anotherTenant");
|
||||
UserModel secondTenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("anotherTenant");
|
||||
restClient.authenticateUser(secondAdminTenantUser);
|
||||
networkApi.getNetworksForUser(tenantUser);
|
||||
networkApi.getNetworksForUser(secondTenantUser);
|
||||
networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,6 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest
|
||||
peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN);
|
||||
}
|
||||
|
||||
@Bug(id="MNT-16904")
|
||||
@TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Failed authentication get site member call returns status code 401")
|
||||
public void unauthenticatedUserIsNotAuthorizedToDeleteSiteMmebershipRequest() throws JsonToModelConversionException, Exception
|
||||
|
||||
@@ -90,6 +90,7 @@ public class GetSiteContainerSanityTests extends RestTest
|
||||
siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Bug(id="MNT-16904")
|
||||
@TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Failed authentication get site container call returns status code 401")
|
||||
@Bug(id="MNT-16904")
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -90,9 +91,10 @@ public class GetSiteContainersSanityTests extends RestTest
|
||||
siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Bug(id="MNT-16904")
|
||||
@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
|
||||
public void unauthenticatedUserIsNotAuthorizedToRetrieveSiteContainers() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
userModel = dataUser.createRandomTestUser();
|
||||
userModel.setPassword("user wrong password");
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
||||
import org.alfresco.utility.exception.DataPreparationException;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -89,6 +90,7 @@ public class GetSiteMemberSanityTests extends RestTest
|
||||
|
||||
@TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Failed authentication get site member call returns status code 401")
|
||||
@Bug(id = "MNT-16904")
|
||||
public void unauthenticatedUserIsNotAuthorizedToRetrieveSiteMember() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
UserModel inexistentUser = new UserModel("inexistent user", "inexistent password");
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
||||
import org.alfresco.utility.exception.DataPreparationException;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -38,7 +39,7 @@ public class GetSiteMembersSanityTests extends RestTest
|
||||
private UserModel userModel;
|
||||
|
||||
@BeforeClass(alwaysRun=true)
|
||||
public void initTest() throws DataPreparationException
|
||||
public void dataPreparation() throws DataPreparationException
|
||||
{
|
||||
adminUser = dataUser.getAdminUser();
|
||||
siteAPI.useRestClient(restClient);
|
||||
@@ -91,9 +92,10 @@ public class GetSiteMembersSanityTests extends RestTest
|
||||
siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Bug(id="MNT-16904")
|
||||
@TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Failed authentication get site members call returns status code 401 with Manager role")
|
||||
public void getSiteMembersWithManagerRoleFailedAuth() throws JsonToModelConversionException, Exception
|
||||
description = "Failed authentication get site members call returns status code 401")
|
||||
public void unauthenticatedUserIsNotAuthorizedToRetrieveSiteMembers() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
userModel = dataUser.createRandomTestUser();
|
||||
userModel.setPassword("user wrong password");
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
||||
import org.alfresco.utility.exception.DataPreparationException;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -93,9 +94,10 @@ public class GetSiteSanityTests extends RestTest
|
||||
siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Bug(id="MNT-16904")
|
||||
@TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Failed authentication get site call returns status code 401 with Manager role")
|
||||
public void getSiteWithManagerRoleFailedAuth() throws JsonToModelConversionException, Exception
|
||||
description = "Failed authentication get site call returns status code 401")
|
||||
public void unauthenticatedUserIsNotAuthorizedToRetrieveSite() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
userModel = dataUser.createRandomTestUser();
|
||||
userModel.setPassword("user wrong password");
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -94,8 +95,9 @@ public class GetSitesSanityTests extends RestTest
|
||||
siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Bug(id="MNT-16904")
|
||||
@TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Failed authentication get sites call returns status code 401 with Manager role")
|
||||
description = "Failed authentication get sites call returns status code 401")
|
||||
public void unauthenticatedUserIsNotAuthorizedToRetrieveSites() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
|
||||
|
||||
@@ -95,7 +95,7 @@ public class RemoveSiteMemberSanityTests extends RestTest
|
||||
|
||||
@TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify that unauthenticated user is not able to delete site member")
|
||||
public void unauthenticatedUserIsNotAuthorizedToDeleteSiteMmeber() throws Exception{
|
||||
public void unauthenticatedUserIsNotAuthorizedToDeleteSiteMember() throws Exception{
|
||||
UserModel inexistentUser = new UserModel("inexistent user", "inexistent password");
|
||||
restClient.authenticateUser(inexistentUser);
|
||||
restSitesAPI.deleteSiteMember(siteModel, testUserModel);
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.utility.data.DataUser.ListUserWithRoles;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.report.Bug;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -85,6 +86,7 @@ public class GetTagsSanityTests extends RestTest
|
||||
}
|
||||
|
||||
@TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Failed authentication get tags call returns status code 401 with Manager role")
|
||||
@Bug(id = "MNT-16904")
|
||||
public void getTagsWithManagerRoleFailedAuth() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager));
|
||||
|
||||
Reference in New Issue
Block a user