DNS -> Dns
This commit is contained in:
@@ -55,7 +55,7 @@ describe('dns provider', function () {
|
||||
});
|
||||
|
||||
it('upsert succeeds', function (done) {
|
||||
domains.upsertDNSRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
domains.upsertDnsRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('noop-record-id');
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('dns provider', function () {
|
||||
});
|
||||
|
||||
it('get succeeds', function (done) {
|
||||
domains.getDNSRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
domains.getDnsRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.be.an(Array);
|
||||
expect(result.length).to.eql(0);
|
||||
@@ -74,7 +74,7 @@ describe('dns provider', function () {
|
||||
});
|
||||
|
||||
it('del succeeds', function (done) {
|
||||
domains.removeDNSRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error) {
|
||||
domains.removeDnsRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error) {
|
||||
expect(error).to.eql(null);
|
||||
|
||||
done();
|
||||
@@ -115,7 +115,7 @@ describe('dns provider', function () {
|
||||
.post('/v2/domains/' + DOMAIN_0.zoneName + '/records')
|
||||
.reply(201, { domain_record: DOMAIN_RECORD_0 });
|
||||
|
||||
domains.upsertDNSRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
domains.upsertDnsRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('3352892');
|
||||
expect(req1.isDone()).to.be.ok();
|
||||
@@ -165,7 +165,7 @@ describe('dns provider', function () {
|
||||
.put('/v2/domains/' + DOMAIN_0.zoneName + '/records/' + DOMAIN_RECORD_1.id)
|
||||
.reply(200, { domain_record: DOMAIN_RECORD_1_NEW });
|
||||
|
||||
domains.upsertDNSRecords('test', DOMAIN_0.domain, 'A', [ DOMAIN_RECORD_1_NEW.data ], function (error, result) {
|
||||
domains.upsertDnsRecords('test', DOMAIN_0.domain, 'A', [ DOMAIN_RECORD_1_NEW.data ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('3352893');
|
||||
expect(req1.isDone()).to.be.ok();
|
||||
@@ -251,7 +251,7 @@ describe('dns provider', function () {
|
||||
.post('/v2/domains/' + DOMAIN_0.zoneName + '/records')
|
||||
.reply(201, { domain_record: DOMAIN_RECORD_2_NEW });
|
||||
|
||||
domains.upsertDNSRecords('', DOMAIN_0.domain, 'TXT', [ DOMAIN_RECORD_2_NEW.data, DOMAIN_RECORD_1_NEW.data, DOMAIN_RECORD_3_NEW.data ], function (error, result) {
|
||||
domains.upsertDnsRecords('', DOMAIN_0.domain, 'TXT', [ DOMAIN_RECORD_2_NEW.data, DOMAIN_RECORD_1_NEW.data, DOMAIN_RECORD_3_NEW.data ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('3352893');
|
||||
expect(req1.isDone()).to.be.ok();
|
||||
@@ -290,7 +290,7 @@ describe('dns provider', function () {
|
||||
.get('/v2/domains/' + DOMAIN_0.zoneName + '/records')
|
||||
.reply(200, { domain_records: [ DOMAIN_RECORD_0, DOMAIN_RECORD_1 ] });
|
||||
|
||||
domains.getDNSRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
domains.getDnsRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.be.an(Array);
|
||||
expect(result.length).to.eql(1);
|
||||
@@ -331,7 +331,7 @@ describe('dns provider', function () {
|
||||
.delete('/v2/domains/' + DOMAIN_0.zoneName + '/records/' + DOMAIN_RECORD_1.id)
|
||||
.reply(204, {});
|
||||
|
||||
domains.removeDNSRecords('test', DOMAIN_0.domain, 'A', ['1.2.3.4'], function (error) {
|
||||
domains.removeDnsRecords('test', DOMAIN_0.domain, 'A', ['1.2.3.4'], function (error) {
|
||||
expect(error).to.eql(null);
|
||||
expect(req1.isDone()).to.be.ok();
|
||||
expect(req2.isDone()).to.be.ok();
|
||||
@@ -437,7 +437,7 @@ describe('dns provider', function () {
|
||||
}
|
||||
}]);
|
||||
|
||||
domains.upsertDNSRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
domains.upsertDnsRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('/change/C2QLKQIWEI0BZF');
|
||||
expect(awsAnswerQueue.length).to.eql(0);
|
||||
@@ -456,7 +456,7 @@ describe('dns provider', function () {
|
||||
}
|
||||
}]);
|
||||
|
||||
domains.upsertDNSRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
domains.upsertDnsRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('/change/C2QLKQIWEI0BZF');
|
||||
expect(awsAnswerQueue.length).to.eql(0);
|
||||
@@ -475,7 +475,7 @@ describe('dns provider', function () {
|
||||
}
|
||||
}]);
|
||||
|
||||
domains.upsertDNSRecords('', DOMAIN_0.domain, 'TXT', [ 'first', 'second', 'third' ], function (error, result) {
|
||||
domains.upsertDnsRecords('', DOMAIN_0.domain, 'TXT', [ 'first', 'second', 'third' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('/change/C2QLKQIWEI0BZF');
|
||||
expect(awsAnswerQueue.length).to.eql(0);
|
||||
@@ -496,7 +496,7 @@ describe('dns provider', function () {
|
||||
}]
|
||||
}]);
|
||||
|
||||
domains.getDNSRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
domains.getDnsRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.be.an(Array);
|
||||
expect(result.length).to.eql(1);
|
||||
@@ -517,7 +517,7 @@ describe('dns provider', function () {
|
||||
}
|
||||
}]);
|
||||
|
||||
domains.removeDNSRecords('test', DOMAIN_0.domain, 'A', ['1.2.3.4'], function (error) {
|
||||
domains.removeDnsRecords('test', DOMAIN_0.domain, 'A', ['1.2.3.4'], function (error) {
|
||||
expect(error).to.eql(null);
|
||||
expect(awsAnswerQueue.length).to.eql(0);
|
||||
|
||||
@@ -588,7 +588,7 @@ describe('dns provider', function () {
|
||||
zoneQueue.push([null, [ ]]); // getRecords
|
||||
zoneQueue.push([null, {id: '1'}]);
|
||||
|
||||
domains.upsertDNSRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
domains.upsertDnsRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('1');
|
||||
expect(zoneQueue.length).to.eql(0);
|
||||
@@ -602,7 +602,7 @@ describe('dns provider', function () {
|
||||
zoneQueue.push([null, [GCDNS().zone('test').record('A', {'name': 'test', data:['5.6.7.8'], ttl: 1})]]);
|
||||
zoneQueue.push([null, {id: '2'}]);
|
||||
|
||||
domains.upsertDNSRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
domains.upsertDnsRecords('test', DOMAIN_0.domain, 'A', [ '1.2.3.4' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('2');
|
||||
expect(zoneQueue.length).to.eql(0);
|
||||
@@ -616,7 +616,7 @@ describe('dns provider', function () {
|
||||
zoneQueue.push([null, [ ]]); // getRecords
|
||||
zoneQueue.push([null, {id: '3'}]);
|
||||
|
||||
domains.upsertDNSRecords('', DOMAIN_0.domain, 'TXT', [ 'first', 'second', 'third' ], function (error, result) {
|
||||
domains.upsertDnsRecords('', DOMAIN_0.domain, 'TXT', [ 'first', 'second', 'third' ], function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.eql('3');
|
||||
expect(zoneQueue.length).to.eql(0);
|
||||
@@ -629,7 +629,7 @@ describe('dns provider', function () {
|
||||
zoneQueue.push([null, HOSTED_ZONES]);
|
||||
zoneQueue.push([null, [GCDNS().zone('test').record('A', {'name': 'test', data:['1.2.3.4', '5.6.7.8'], ttl: 1})]]);
|
||||
|
||||
domains.getDNSRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
domains.getDnsRecords('test', DOMAIN_0.domain, 'A', function (error, result) {
|
||||
expect(error).to.eql(null);
|
||||
expect(result).to.be.an(Array);
|
||||
expect(result.length).to.eql(2);
|
||||
@@ -645,7 +645,7 @@ describe('dns provider', function () {
|
||||
zoneQueue.push([null, [GCDNS().zone('test').record('A', {'name': 'test', data:['5.6.7.8'], ttl: 1})]]);
|
||||
zoneQueue.push([null, {id: '5'}]);
|
||||
|
||||
domains.removeDNSRecords('test', DOMAIN_0.domain, 'A', ['1.2.3.4'], function (error) {
|
||||
domains.removeDnsRecords('test', DOMAIN_0.domain, 'A', ['1.2.3.4'], function (error) {
|
||||
expect(error).to.eql(null);
|
||||
expect(zoneQueue.length).to.eql(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user