tests: more common'ification
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
exports = module.exports = {
|
||||
getRemoteSupport,
|
||||
enableRemoteSupport
|
||||
enableRemoteSupport,
|
||||
|
||||
_sshInfo: sshInfo
|
||||
};
|
||||
|
||||
let assert = require('assert'),
|
||||
const assert = require('assert'),
|
||||
BoxError = require('./boxerror.js'),
|
||||
constants = require('./constants.js'),
|
||||
eventlog = require('./eventlog.js'),
|
||||
@@ -54,7 +56,7 @@ function enableRemoteSupport(enable, auditSource, callback) {
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
let si = sshInfo();
|
||||
const si = sshInfo();
|
||||
shell.sudo('support', [ AUTHORIZED_KEYS_CMD, enable ? 'enable' : 'disable', si.filePath, si.user ], {}, function (error) {
|
||||
if (error) callback(new BoxError(BoxError.FS_ERROR, error));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user