godaddy: do not remove all the records of type

This commit is contained in:
Girish Ramakrishnan
2022-04-28 17:43:10 -07:00
parent 765f6d1b12
commit e097b79f65
2 changed files with 9 additions and 7 deletions

View File

@@ -338,18 +338,13 @@ describe('dns provider', function () {
data: '1.2.3.4'
}];
const DOMAIN_RECORD_1 = [{ // replaced
ttl: 600,
data: '0.0.0.0'
}];
const req1 = nock(GODADDY_API)
.get('/' + domainCopy.zoneName + '/records/A/test')
.reply(200, DOMAIN_RECORD_0);
const req2 = nock(GODADDY_API)
.put('/' + domainCopy.zoneName + '/records/A/test', DOMAIN_RECORD_1)
.reply(200, {});
.delete('/' + domainCopy.zoneName + '/records/A/test')
.reply(204, {});
await dns.removeDnsRecords('test', domainCopy.domain, 'A', ['1.2.3.4']);
expect(req1.isDone()).to.be.ok();