TAS - 2891 - getDeployments

This commit is contained in:
cagache
2017-01-31 12:16:36 +02:00
parent 649deca70c
commit 2a368b7116
2 changed files with 18 additions and 2 deletions
@@ -143,4 +143,21 @@ public class GetDeploymentsFullTests extends RestTest
.field("name").isNull();
}
@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.DEPLOYMENTS },
executionType = ExecutionType.REGRESSION,
description = "Verify that network admin user is not able to get a deployment from other network using REST API and status code is OK (200)")
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.DEPLOYMENTS, TestGroup.FULL, TestGroup.NETWORKS})
public void adminDoesNotGetDeploymentsFromOtherNetwork() throws Exception
{
UserModel adminTenantUser1 = UserModel.getAdminTenantUser();
UserModel adminTenantUser2 = UserModel.getAdminTenantUser();
restClient.authenticateUser(adminUserModel).usingTenant().createTenant(adminTenantUser1);
restClient.usingTenant().createTenant(adminTenantUser2);
RestDeploymentModel deployment = restClient.authenticateUser(adminTenantUser1).withWorkflowAPI().getDeployments().getOneRandomEntry().onModel();
deployments = restClient.authenticateUser(adminTenantUser2).withWorkflowAPI().getDeployments();
restClient.assertStatusCodeIs(HttpStatus.OK);
deployments.assertThat().entriesListDoesNotContain("id", deployment.getId());
}
}
@@ -50,7 +50,6 @@ public class GetDeploymentsSanityTests extends RestTest
restClient.usingTenant().createTenant(adminTenantUser);
deployments = restClient.authenticateUser(adminTenantUser).withWorkflowAPI().getDeployments();
restClient.assertStatusCodeIs(HttpStatus.OK);
deployments.assertThat().entriesListIsNotEmpty()
.and().entriesListDoesNotContain("name", "customWorkflowExtentionForRest.bpmn");
deployments.assertThat().entriesListIsNotEmpty();
}
}