opts.skip for destructive stuff
This commit is contained in:
parent
2eeb68cba5
commit
403e4bd204
@ -12,7 +12,6 @@
|
|||||||
* Test create/start/stop/delete/etc. work flows
|
* Test create/start/stop/delete/etc. work flows
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var assert = require('assert');
|
|
||||||
var f = require('util').format;
|
var f = require('util').format;
|
||||||
|
|
||||||
var vasync = require('vasync');
|
var vasync = require('vasync');
|
||||||
@ -26,12 +25,9 @@ var VM_ALIAS = 'node-triton-test-vm-1';
|
|||||||
var VM_IMAGE = 'base-64@15.2.0';
|
var VM_IMAGE = 'base-64@15.2.0';
|
||||||
var VM_PACKAGE = 't4-standard-128M';
|
var VM_PACKAGE = 't4-standard-128M';
|
||||||
|
|
||||||
// TODO clean this up
|
var opts = {
|
||||||
assert.equal(h.CONFIG.url, 'https://us-east-3b.api.joyent.com');
|
skip: !h.CONFIG.destructiveAllowed
|
||||||
if (h.CONFIG.destructiveAllowed !== true) {
|
};
|
||||||
console.error('skipping manage integration tests - destructive actions disabled');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* h.triton wrapper that:
|
* h.triton wrapper that:
|
||||||
@ -60,6 +56,11 @@ var instance;
|
|||||||
|
|
||||||
// --- Tests
|
// --- Tests
|
||||||
|
|
||||||
|
if (opts.skip) {
|
||||||
|
console.error('** skipping manage workflow tests');
|
||||||
|
console.error('** set "destructiveAllowed" to enable');
|
||||||
|
}
|
||||||
|
test('triton manage workflow', opts, function (t) {
|
||||||
// create a test machine (blocking) and output JSON
|
// create a test machine (blocking) and output JSON
|
||||||
test('triton create', function (t) {
|
test('triton create', function (t) {
|
||||||
triton(t, ['create', '-wjn', VM_ALIAS, VM_IMAGE, VM_PACKAGE],
|
triton(t, ['create', '-wjn', VM_ALIAS, VM_IMAGE, VM_PACKAGE],
|
||||||
@ -135,3 +136,4 @@ test('triton delete', function (t) {
|
|||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user