diff --git a/test/alt-domain-test.js b/test/alt-domain-test.js index dde92fe..91501fb 100644 --- a/test/alt-domain-test.js +++ b/test/alt-domain-test.js @@ -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); });