joyent/node-triton#218 add 'allowVolumesTests' to test config and skip volumes tests by default

Reviewed by: Josh Wilsdon <josh@wilsdon.ca>
Approved by: Josh Wilsdon <josh@wilsdon.ca>
This commit is contained in:
Trent Mick 2017-07-28 16:57:55 -07:00
parent dc1b6c75b7
commit 546abee318
3 changed files with 18 additions and 2 deletions

View File

@ -16,6 +16,10 @@
// This is essentially the "safe" guard.
"allowWriteActions": true,
// While volumes support is still experimental (and not deployed everywhere)
// volumes test are skipped by default. Set this to true to run them.
"allowVolumesTests": true,
// Optional. Set to 'true' to skip affinity tests. Affinity tests assume
// the datacenter has multiple servers to which provisions can go. So if
// you are testing against COAL, for example, you'll need to set this

View File

@ -23,8 +23,14 @@ var h = require('./helpers');
var FABRIC_NETWORKS = [];
var testOpts = {
skip: !h.CONFIG.allowWriteActions
skip: !(h.CONFIG.allowWriteActions && h.CONFIG.allowVolumesTests)
};
if (testOpts.skip) {
console.error('** skipping %s tests', __filename);
console.error('** set "allowWriteActions" and "allowVolumesTests" '
+ 'in test config to enable');
}
test('triton volume create with non-default size...', testOpts, function (tt) {
var validVolumeName =
h.makeResourceName('node-triton-test-volume-create-non-default-' +

View File

@ -23,8 +23,14 @@ var h = require('./helpers');
var FABRIC_NETWORKS = [];
var testOpts = {
skip: !h.CONFIG.allowWriteActions
skip: !(h.CONFIG.allowWriteActions && h.CONFIG.allowVolumesTests)
};
if (testOpts.skip) {
console.error('** skipping %s tests', __filename);
console.error('** set "allowWriteActions" and "allowVolumesTests" '
+ 'in test config to enable');
}
test('triton volume create ...', testOpts, function (tt) {
var currentVolume;
var validVolumeName =