diff --git a/test/selfhost-ec2-create-test.js b/test/selfhost-ec2-create-test.js index 5b1eb66..af3dbfa 100644 --- a/test/selfhost-ec2-create-test.js +++ b/test/selfhost-ec2-create-test.js @@ -219,11 +219,16 @@ describe('Selfhost EC2 Cloudron creation', function () { cloudron.checkMail(owner, done); }); - it('can delete the cloudron', function (done) { + after(function (done) { + console.log('Cleanup EC2 instances'); + var params = { InstanceIds: [ instanceId, newInstanceId ] }; - ec2.terminateInstances(params, done); + ec2.terminateInstances(params, function (error) { + if (error) console.log(error); + done(); + }); }); });