diff --git a/src/routes/test/tasks-test.js b/src/routes/test/tasks-test.js index 325390241..66993ab26 100644 --- a/src/routes/test/tasks-test.js +++ b/src/routes/test/tasks-test.js @@ -117,7 +117,7 @@ describe('Tasks API', function () { expect(res.body.active).to.be(false); // finished expect(res.body.success).to.be(false); expect(res.body.result).to.be(null); - expect(res.body.error.message).to.contain('signal SIGTERM'); + expect(res.body.error.message).to.contain('stopped'); done(); }); }); diff --git a/src/scripts/starttask.sh b/src/scripts/starttask.sh index 3a24783ee..587c74e0c 100755 --- a/src/scripts/starttask.sh +++ b/src/scripts/starttask.sh @@ -44,7 +44,8 @@ else binds_to="" fi +# DEBUG has to be hardcoded because it is not set in the tests systemd-run --unit "${service_name}" --pipe --wait --nice "${nice}" --uid=${id} --gid=${id} ${binds_to} ${memory_limit} \ - -E HOME=${HOME} -E USER=${SUDO_USER} -E DEBUG=${DEBUG} -E BOX_ENV=${BOX_ENV} -E NODE_ENV=production \ + -E HOME=${HOME} -E USER=${SUDO_USER} -E DEBUG=box:* -E BOX_ENV=${BOX_ENV} -E NODE_ENV=production \ "${task_worker}" "${task_id}" "${logfile}" diff --git a/src/test/tasks-test.js b/src/test/tasks-test.js index f966f9447..1d83420fb 100644 --- a/src/test/tasks-test.js +++ b/src/test/tasks-test.js @@ -82,7 +82,7 @@ describe('task', function () { tasks.startTask(taskId, {}, function (error, result) { expect(error).to.be.ok(); - expect(error.message).to.contain('SIGTERM'); + expect(error.message).to.contain('stopped'); expect(result).to.be(null); expect(taskId).to.be.ok(); done();