move EC2 cleanup to simply after()

This commit is contained in:
Johannes Zellner 2016-07-01 16:04:44 +02:00
parent 2b1559a6a1
commit 2e6eb0941c

View File

@ -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();
});
});
});