From 14d29bdf65610a13506023bbf2fcaead089fd5ae Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Thu, 8 Sep 2016 13:37:32 +0200 Subject: [PATCH] Fix id detection --- test/selfhost-ec2-test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/selfhost-ec2-test.js b/test/selfhost-ec2-test.js index cbbef3f..ecad468 100644 --- a/test/selfhost-ec2-test.js +++ b/test/selfhost-ec2-test.js @@ -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 ]