From 83c644820254f18dd50738257e833c1bd6618cb3 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Mon, 4 Jan 2016 10:45:13 -0800 Subject: [PATCH] clistyle: Some fixes to integration tests for 'triton inst' changes --- test/integration/cli-manage-workflow.test.js | 15 ++++++++------- test/integration/cli-subcommands.test.js | 7 ++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test/integration/cli-manage-workflow.test.js b/test/integration/cli-manage-workflow.test.js index 0d64b56..fa054c6 100644 --- a/test/integration/cli-manage-workflow.test.js +++ b/test/integration/cli-manage-workflow.test.js @@ -63,7 +63,8 @@ test('triton manage workflow', opts, function (tt) { }); tt.test(' cleanup existing inst with alias ' + INST_ALIAS, function (t) { - h.triton(['inst', '-j', INST_ALIAS], function (err, stdout, stderr) { + h.triton(['inst', 'get', '-j', INST_ALIAS], + function (err, stdout, stderr) { if (err) { if (err.code === 3) { // `triton` code for ResourceNotFound t.ok(true, 'no pre-existing alias in the way'); @@ -177,25 +178,25 @@ test('triton manage workflow', opts, function (tt) { }); // test `triton instance -j` with the UUID, the alias, and the short ID - tt.test(' triton instance', function (t) { + tt.test(' triton instance get', function (t) { var uuid = instance.id; var shortId = common.uuidToShortId(uuid); vasync.parallel({ funcs: [ function (cb) { - h.safeTriton(t, ['instance', '-j', INST_ALIAS], + h.safeTriton(t, ['instance', 'get', '-j', INST_ALIAS], function (stdout) { cb(null, stdout); }); }, function (cb) { - h.safeTriton(t, ['instance', '-j', uuid], + h.safeTriton(t, ['instance', 'get', '-j', uuid], function (stdout) { cb(null, stdout); }); }, function (cb) { - h.safeTriton(t, ['instance', '-j', shortId], + h.safeTriton(t, ['instance', 'get', '-j', shortId], function (stdout) { cb(null, stdout); }); @@ -286,7 +287,7 @@ test('triton manage workflow', opts, function (tt) { // wait for the machine to stop tt.test(' triton confirm stopped', function (t) { - h.safeTriton(t, {json: true, args: ['instance', '-j', INST_ALIAS]}, + h.safeTriton(t, {json: true, args: ['inst', 'get', '-j', INST_ALIAS]}, function (d) { instance = d; @@ -307,7 +308,7 @@ test('triton manage workflow', opts, function (tt) { // wait for the machine to start tt.test(' confirm running', function (t) { - h.safeTriton(t, {json: true, args: ['instance', '-j', INST_ALIAS]}, + h.safeTriton(t, {json: true, args: ['inst', 'get', '-j', INST_ALIAS]}, function (d) { instance = d; t.equal(d.state, 'running', 'machine running'); diff --git a/test/integration/cli-subcommands.test.js b/test/integration/cli-subcommands.test.js index 18b27b4..c60e1fa 100644 --- a/test/integration/cli-subcommands.test.js +++ b/test/integration/cli-subcommands.test.js @@ -31,10 +31,11 @@ var subs = [ ['account', 'whoami'], ['services'], ['datacenters'], - ['create-instance', 'create'], - ['instances', 'insts', 'list', 'ls'], ['instance', 'inst'], - ['instance-audit', 'audit'], + ['instance list', 'instance ls', 'instances', 'insts', 'ls'], + ['instance get'], + ['instance create', 'create'], + ['instance audit'], ['start-instance', 'start'], ['stop-instance', 'stop'], ['reboot-instance', 'reboot'],