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 ]