fix failing of non existent record

This commit is contained in:
Philipp Kunz 2017-01-27 00:37:32 +01:00
parent aaa218003e
commit 1cf09016df
4 changed files with 17 additions and 2 deletions

4
dist/index.js vendored
View File

@ -88,6 +88,7 @@ class Dnsly {
plugins.dns.resolveTxt(recordNameArg, (err, recordsArg) => {
if (err) {
done.reject(err);
return;
}
let responseArray = [];
for (let record of recordsArg) {
@ -111,6 +112,7 @@ class Dnsly {
plugins.dns.resolve(recordNameArg, recordTypeArg, (err, recordsArg) => {
if (err) {
done.reject(err);
return;
}
let responseArray = [];
for (let record of recordsArg) {
@ -139,4 +141,4 @@ class Dnsly {
}
}
exports.Dnsly = Dnsly;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQSw0QkFBMkI7QUFDM0IsMkNBQTBDO0FBcUIxQzs7R0FFRztBQUNIO0lBR0k7O09BRUc7SUFDSCxZQUFZLGlCQUErQixRQUFRO1FBQy9DLElBQUksQ0FBQyxlQUFlLENBQUMsY0FBYyxDQUFDLENBQUE7SUFDeEMsQ0FBQztJQUVEOztPQUVHO0lBQ0csU0FBUyxDQUFDLGFBQXFCLEVBQUUsYUFBNkI7O1lBQ2hFLE1BQU0sQ0FBQyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7Z0JBQ3BCLEtBQUssS0FBSztvQkFDTixNQUFNLENBQUMsTUFBTSxJQUFJLENBQUMsWUFBWSxDQUFDLGFBQWEsQ0FBQyxDQUFBO2dCQUNqRCxLQUFLLEdBQUc7b0JBQ0osTUFBTSxDQUFDLE1BQU0sSUFBSSxDQUFDLFVBQVUsQ0FBQyxhQUFhLENBQUMsQ0FBQTtnQkFDL0MsS0FBSyxNQUFNO29CQUNQLE1BQU0sQ0FBQyxNQUFNLElBQUks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xFQUFFLGFBQWE7b0JBQ25CLEtBQUssRUFBRSxNQUFNO29CQUNiLElBQUksRUFBRSxhQUFhO2lCQUN0QixDQUFDLENBQUE7WUFDTixDQUFDO1lBQ0QsSUFBSSxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUMsQ0FBQTtRQUMvQixDQUFDLENBQUMsQ0FBQTtRQUNGLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFBO0lBQ3ZCLENBQUM7SUFFRDs7T0FFRztJQUNLLGVBQWUsQ0FBQyxXQUF5QjtRQUM3QyxFQUFFLENBQUMsQ0FBQyxXQUFXLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQztZQUMzQixJQUFJLENBQUMsV0FBVyxHQUFHLFNBQVMsQ0FBQTtZQUM1QixJQUFJLENBQUMsYUFBYSxHQUFHLEVBQUUsQ0FBQTtZQUN2QixPQUFPLENBQUMsR0FBRyxDQUFDLFVBQVUsQ0FBQyxDQUFDLFNBQVMsRUFBRSxTQUFTLENBQUMsQ0FBQyxDQUFBO1FBQ2xELENBQUM7UUFBQyxJQUFJLENBQUMsQ0FBQztZQUNKLE1BQU0sSUFBSSxLQUFLLENBQUMsc0JBQXNCLENBQUMsQ0FBQTtRQUMzQyxDQUFDO0lBQ0wsQ0FBQztDQUNKO0FBNUhELHNCQTRIQyJ9

View File

@ -46,5 +46,9 @@ describe('dnsly', function () {
this.timeout(30000);
return smartchai_1.expect(testDnsly.checkUntilAvailable('dnsly_txt.bleu.de', 'TXT', 'sometext_txt2')).to.eventually.be.false;
});
it('should check until DNS is available an return false if it fails', function () {
this.timeout(30000);
return smartchai_1.expect(testDnsly.checkUntilAvailable('dnsly_txtNotThere.bleu.de', 'TXT', 'sometext_txt2')).to.eventually.be.false;
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZ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UNOLENBQUMsQ0FBQyxDQUFBIn0=

View File

@ -55,4 +55,11 @@ describe('dnsly', function () {
this.timeout(30000)
return expect(testDnsly.checkUntilAvailable('dnsly_txt.bleu.de','TXT','sometext_txt2')).to.eventually.be.false
})
it('should check until DNS is available an return false if it fails', function() {
this.timeout(30000)
return expect(
testDnsly.checkUntilAvailable('dnsly_txtNotThere.bleu.de','TXT','sometext_txt2')
).to.eventually.be.false
})
})

View File

@ -95,6 +95,7 @@ export class Dnsly {
plugins.dns.resolveTxt(recordNameArg, (err, recordsArg) => {
if (err) {
done.reject(err)
return
}
let responseArray: IDnsRecord[] = []
for (let record of recordsArg) {
@ -119,6 +120,7 @@ export class Dnsly {
plugins.dns.resolve(recordNameArg, recordTypeArg, (err, recordsArg) => {
if (err) {
done.reject(err)
return
}
let responseArray: IDnsRecord[] = []
for (let record of recordsArg) {