Fix tests

This commit is contained in:
Girish Ramakrishnan
2020-08-06 22:04:46 -07:00
parent 114b45882a
commit f8e22a0730
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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();
});
});
+2 -1
View File
@@ -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}"
+1 -1
View File
@@ -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();