diff --git a/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java b/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java index 18839d9a4d0..2cf149e687b 100644 --- a/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java +++ b/Kitodo/src/test/java/org/kitodo/production/services/workflow/WorkflowControllerServiceIT.java @@ -43,8 +43,10 @@ import org.kitodo.data.database.exceptions.DAOException; import org.kitodo.data.exceptions.DataException; import org.kitodo.production.services.ServiceManager; +import org.kitodo.production.services.data.ProcessService; import org.kitodo.production.services.data.TaskService; import org.kitodo.production.services.file.FileService; +import org.kitodo.utils.ProcessTestUtils; public class WorkflowControllerServiceIT { @@ -58,11 +60,14 @@ public class WorkflowControllerServiceIT { private static final FileService fileService = ServiceManager.getFileService(); private static final TaskService taskService = ServiceManager.getTaskService(); private static final WorkflowControllerService workflowService = new WorkflowControllerService(); + private static int workflowTestProcessId = -1; @Before public void prepareDatabase() throws Exception { MockDatabase.startNode(); MockDatabase.insertProcessesForWorkflowFull(); + workflowTestProcessId = Math.toIntExact(ServiceManager.getProcessService().count()); + ProcessTestUtils.copyTestFiles(workflowTestProcessId, "testmetaNewspaper.xml"); SecurityTestUtils.addUserDataToSecurityContext(ServiceManager.getUserService().getById(1), 1); usersDirectory.mkdir(); @@ -77,6 +82,7 @@ public void prepareDatabase() throws Exception { @After public void cleanDatabase() throws Exception { + ProcessService.deleteProcess(workflowTestProcessId); MockDatabase.stopNode(); MockDatabase.cleanDatabase(); SecurityTestUtils.cleanSecurityContext(); @@ -300,7 +306,7 @@ public void shouldCloseAndAssignNextForProcessWithParallelTasks() throws Excepti @Test public void shouldCloseForProcessWithScriptParallelTasks() throws Exception { - assumeTrue(!SystemUtils.IS_OS_WINDOWS && !SystemUtils.IS_OS_MAC); + assumeTrue(!SystemUtils.IS_OS_WINDOWS); // if you want to execute test on windows change sh to bat in // gateway-test5.bpmn20.xml diff --git a/Kitodo/src/test/resources/scripts/not_working_script.sh b/Kitodo/src/test/resources/scripts/not_working_script.sh old mode 100755 new mode 100644 diff --git a/Kitodo/src/test/resources/scripts/script_createDirUserHome.sh b/Kitodo/src/test/resources/scripts/script_createDirUserHome.sh old mode 100755 new mode 100644