joyent/node-triton#167 test suite: use 'nodetritontest' in test key name, createTestInst
never reports failure
Reviewed by: Brian Bennett <brian.bennett@joyent.com>
This commit is contained in:
parent
d99110553d
commit
41b5c506ce
@ -23,7 +23,7 @@ var backoff = require('backoff');
|
|||||||
var KEY_PATH = __dirname + '/data/id_rsa.pub';
|
var KEY_PATH = __dirname + '/data/id_rsa.pub';
|
||||||
var KEY_SIG = '66:ca:1c:09:75:99:35:69:be:91:08:25:03:c0:17:c0';
|
var KEY_SIG = '66:ca:1c:09:75:99:35:69:be:91:08:25:03:c0:17:c0';
|
||||||
var KEY_EMAIL = 'test@localhost.local';
|
var KEY_EMAIL = 'test@localhost.local';
|
||||||
var KEY_NAME = 'testkey';
|
var KEY_NAME = 'nodetritontest-key1';
|
||||||
var MAX_CHECK_KEY_TRIES = 10;
|
var MAX_CHECK_KEY_TRIES = 10;
|
||||||
|
|
||||||
// --- Tests
|
// --- Tests
|
||||||
|
@ -265,13 +265,25 @@ function createClient(cb) {
|
|||||||
function createTestInst(t, name, cb) {
|
function createTestInst(t, name, cb) {
|
||||||
getTestPkg(t, function (err, pkgId) {
|
getTestPkg(t, function (err, pkgId) {
|
||||||
t.ifErr(err);
|
t.ifErr(err);
|
||||||
|
if (err) {
|
||||||
|
cb(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getTestImg(t, function (err2, imgId) {
|
getTestImg(t, function (err2, imgId) {
|
||||||
t.ifErr(err2);
|
t.ifErr(err2);
|
||||||
|
if (err2) {
|
||||||
|
cb(err2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var cmd = f('instance create -w -n %s %s %s', name, imgId, pkgId);
|
var cmd = f('instance create -w -n %s %s %s', name, imgId, pkgId);
|
||||||
triton(cmd, function (err3, stdout) {
|
triton(cmd, function (err3, stdout) {
|
||||||
t.ifErr(err3, 'create test instance');
|
t.ifErr(err3, 'create test instance');
|
||||||
|
if (err3) {
|
||||||
|
cb(err3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var match = stdout.match(/Created .+? \((.+)\)/);
|
var match = stdout.match(/Created .+? \((.+)\)/);
|
||||||
var inst = match[1];
|
var inst = match[1];
|
||||||
|
Reference in New Issue
Block a user