Fix id detection

This commit is contained in:
Johannes Zellner 2016-09-08 13:37:32 +02:00
parent c418fb907e
commit 14d29bdf65

View File

@ -97,7 +97,7 @@ describe('Selfhost EC2 Cloudron creation', function () {
}
// Wohooo strings!
instanceId = out.stdout.split('\n').filter(function (l) { return l.indexOf('ID: ') !== -1; })[0].split(':')[1].trim();
instanceId = out.stdout.split('\n').filter(function (l) { return l.indexOf(' ID: ') !== -1; })[0].split(':')[1].trim();
console.log('New instance created with ID', instanceId);
@ -226,7 +226,7 @@ describe('Selfhost EC2 Cloudron creation', function () {
assert(false, 'Restore failed');
}
restoreInstanceId = out.stdout.split('\n').filter(function (l) { return l.indexOf('ID: ') !== -1; })[0].split(':')[1].trim();
restoreInstanceId = out.stdout.split('\n').filter(function (l) { return l.indexOf(' ID: ') !== -1; })[0].split(':')[1].trim();
console.log('New instance created with ID', restoreInstanceId);
});
@ -255,7 +255,7 @@ describe('Selfhost EC2 Cloudron creation', function () {
assert(false, 'Migrate failed');
}
migrateInstanceId = out.stdout.split('\n').filter(function (l) { return l.indexOf('ID: ') !== -1; })[0].split(':')[1].trim();
migrateInstanceId = out.stdout.split('\n').filter(function (l) { return l.indexOf(' ID: ') !== -1; })[0].split(':')[1].trim();
console.log('New instance created with ID', restoreInstanceId);
});
@ -269,7 +269,7 @@ describe('Selfhost EC2 Cloudron creation', function () {
});
it('can delete the cloudron', function (done) {
console.log('Cleanup EC2 instances');
console.log('Cleanup EC2 instances', instanceId, restoreInstanceId, migrateInstanceId);
var params = {
InstanceIds: [ instanceId, restoreInstanceId, migrateInstanceId ]