From 546abee31876b19ee5d9753b518b114ff003fc8d Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Fri, 28 Jul 2017 16:57:55 -0700 Subject: [PATCH] joyent/node-triton#218 add 'allowVolumesTests' to test config and skip volumes tests by default Reviewed by: Josh Wilsdon Approved by: Josh Wilsdon --- test/config.json.sample | 4 ++++ test/integration/cli-volumes-size.test.js | 8 +++++++- test/integration/cli-volumes.test.js | 8 +++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/test/config.json.sample b/test/config.json.sample index 8cfeb8e..ec64816 100644 --- a/test/config.json.sample +++ b/test/config.json.sample @@ -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 diff --git a/test/integration/cli-volumes-size.test.js b/test/integration/cli-volumes-size.test.js index f89a3c0..02360f1 100644 --- a/test/integration/cli-volumes-size.test.js +++ b/test/integration/cli-volumes-size.test.js @@ -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-' + diff --git a/test/integration/cli-volumes.test.js b/test/integration/cli-volumes.test.js index ad7a1e4..123c59a 100644 --- a/test/integration/cli-volumes.test.js +++ b/test/integration/cli-volumes.test.js @@ -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 =