fix tests

This commit is contained in:
Girish Ramakrishnan
2021-06-03 12:20:44 -07:00
parent c90a9e43cf
commit 8da4eaf4a3
27 changed files with 474 additions and 739 deletions

View File

@@ -123,13 +123,13 @@ function checkDiskSpace(callback) {
debug('Checking disk space');
getDisks(function (error, disks) {
getDisks(async function (error, disks) {
if (error) {
debug('checkDiskSpace: error getting disks %s', error.message);
return callback();
}
var oos = disks.disks.some(function (entry) {
const oos = disks.disks.some(function (entry) {
// ignore other filesystems but where box, app and platform data is
if (entry.filesystem !== disks.boxDataDisk
&& entry.filesystem !== disks.platformDataDisk
@@ -142,7 +142,9 @@ function checkDiskSpace(callback) {
debug('checkDiskSpace: disk space checked. ok: %s', !oos);
notifications.alert(notifications.ALERT_DISK_SPACE, 'Server is running out of disk space', oos ? JSON.stringify(disks.disks, null, 4) : '', callback);
await notifications.alert(notifications.ALERT_DISK_SPACE, 'Server is running out of disk space', oos ? JSON.stringify(disks.disks, null, 4) : '');
callback();
});
}