fix volume test
This commit is contained in:
@@ -9,6 +9,7 @@ exports = module.exports = {
|
||||
|
||||
const assert = require('assert'),
|
||||
BoxError = require('./boxerror.js'),
|
||||
constants = require('./constants.js'),
|
||||
ejs = require('ejs'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
@@ -48,6 +49,8 @@ function validateMountOptions(type, options) {
|
||||
async function writeMountFile(volume) {
|
||||
assert.strictEqual(typeof volume, 'object');
|
||||
|
||||
if (constants.TEST) return;
|
||||
|
||||
const {name, hostPath, mountType, mountOptions} = volume;
|
||||
|
||||
let options, what, type;
|
||||
@@ -80,6 +83,8 @@ async function writeMountFile(volume) {
|
||||
async function removeMountFile(hostPath) {
|
||||
assert.strictEqual(typeof hostPath, 'string');
|
||||
|
||||
if (constants.TEST) return;
|
||||
|
||||
await safe(shell.promises.sudo('generateMountFile', [ RM_MOUNT_CMD, hostPath ], {})); // ignore any error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user