delete cname record

This commit is contained in:
Girish Ramakrishnan 2016-04-30 09:48:52 -07:00
parent bba174ec32
commit 4a87988bf2
1 changed files with 27 additions and 0 deletions

View File

@ -118,6 +118,33 @@ describe('Alt domain test', function () {
cloudron.uninstallApp(appId);
});
it('can delete cname for altlocation', function (done) {
route53.listHostedZonesByName({ DNSName: CUSTOM_DOMAIN, MaxItems: '1'}, function (error, result) {
if (error) return done(error);
var params = {
ChangeBatch: {
Changes: [{
Action: 'DELETE',
ResourceRecordSet: {
Type: 'CNAME',
Name: ALT_LOCATION + '.' + CUSTOM_DOMAIN + '.',
ResourceRecords: [ { Value: cloudron.appFqdn(location) } ],
TTL: 1
}
}]
},
HostedZoneId: result.HostedZones[0].Id
};
route53.changeResourceRecordSets(params, function(error) {
if (error) return done(error);
done();
});
});
});
it('can delete the cloudron', function () {
appStore.deleteCloudron(box);
});