use of org.camunda.bpm.application.impl.EmbeddedProcessApplication in project camunda-bpm-platform by camunda.
the class DeploymentAuthorizationTest method testRegisterProcessApplicationAsCamundaAdmin.
public void testRegisterProcessApplicationAsCamundaAdmin() {
// given
identityService.setAuthentication(userId, Collections.singletonList(Groups.CAMUNDA_ADMIN));
EmbeddedProcessApplication processApplication = new EmbeddedProcessApplication();
ProcessApplicationReference reference = processApplication.getReference();
String deploymentId = createDeployment(null, FIRST_RESOURCE).getId();
// when
ProcessApplicationRegistration registration = managementService.registerProcessApplication(deploymentId, reference);
// then
assertNotNull(registration);
assertNotNull(getProcessApplicationForDeployment(deploymentId));
deleteDeployment(deploymentId);
}
use of org.camunda.bpm.application.impl.EmbeddedProcessApplication in project camunda-bpm-platform by camunda.
the class DeploymentAuthorizationTest method testRegisterProcessApplicationWithoutAuthorization.
// register process application ///////////////////////////////////
public void testRegisterProcessApplicationWithoutAuthorization() {
// given
EmbeddedProcessApplication processApplication = new EmbeddedProcessApplication();
ProcessApplicationReference reference = processApplication.getReference();
String deploymentId = createDeployment(null, FIRST_RESOURCE).getId();
try {
// when
managementService.registerProcessApplication(deploymentId, reference);
fail("Exception expected: It should not be possible to register a process application");
} catch (AuthorizationException e) {
// then
String message = e.getMessage();
assertTextPresent("ENGINE-03029 Required authenticated group 'camunda-admin'", message);
}
deleteDeployment(deploymentId);
}
use of org.camunda.bpm.application.impl.EmbeddedProcessApplication in project camunda-bpm-platform by camunda.
the class DeploymentAuthorizationTest method testUnregisterProcessApplicationAsCamundaAdmin.
public void testUnregisterProcessApplicationAsCamundaAdmin() {
// given
identityService.setAuthentication(userId, Collections.singletonList(Groups.CAMUNDA_ADMIN));
EmbeddedProcessApplication processApplication = new EmbeddedProcessApplication();
String deploymentId = createDeployment(null, FIRST_RESOURCE).getId();
ProcessApplicationReference reference = processApplication.getReference();
registerProcessApplication(deploymentId, reference);
// when
managementService.unregisterProcessApplication(deploymentId, true);
// then
assertNull(getProcessApplicationForDeployment(deploymentId));
deleteDeployment(deploymentId);
}
use of org.camunda.bpm.application.impl.EmbeddedProcessApplication in project camunda-bpm-platform by camunda.
the class CmmnDisabledTest method setUp.
protected void setUp() throws Exception {
processApplication = new EmbeddedProcessApplication();
super.setUp();
}
use of org.camunda.bpm.application.impl.EmbeddedProcessApplication in project camunda-bpm-platform by camunda.
the class RedeploymentRegistrationTest method init.
@Before
public void init() throws Exception {
repositoryService = engineRule.getRepositoryService();
processEngineConfiguration = engineRule.getProcessEngineConfiguration();
processApplication = new EmbeddedProcessApplication();
}
Aggregations