move EC2 cleanup to simply after()
This commit is contained in:
parent
2b1559a6a1
commit
2e6eb0941c
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user