Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarea committed Sep 6, 2024
1 parent 8eb8520 commit 5f0551a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@types/jest": "^29.5.11",
"@typescript-eslint/parser": "^5.61.0",
"del-cli": "^5.1.0",
"dohdec": "^6.0.0",
"dohdec": "^6.0.1",
"eslint": "^8.56.0",
"jest": "^29.7.0",
"jest-date-mock": "^1.0.8",
Expand Down
24 changes: 12 additions & 12 deletions src/integration_tests/retrieval.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DNSoverHTTPS } from 'dohdec';
import type { DOH_LookupOptions as DohLookupOptions } from 'dohdec/types/doh.js';

import type { Resolver } from '../lib/Resolver.js';
import { Question } from '../lib/utils/dns/Question.js';
Expand Down Expand Up @@ -27,18 +28,17 @@ async function retryUponFailure<Type>(
}
}

const RESOLVER: Resolver = async (question) =>
(await retryUponFailure(
async () =>
DOH_CLIENT.lookup(question.name, {
rrtype: question.getTypeName(),
json: false,
decode: false,
dnssec: true, // Retrieve RRSig records
dnssecCheckingDisabled: true,
}),
3,
)) as Promise<Buffer>;
const RESOLVER: Resolver = async (question) => {
const options: DohLookupOptions = {
rrtype: question.getTypeName(),
json: false,
decode: false,
dnssec: true, // Retrieve RRSig records
dnssecCheckingDisabled: true,
};
const lookUp = async () => DOH_CLIENT.lookup(question.name, options) as Promise<Buffer>;
return retryUponFailure(lookUp, 3);
};

test('Positive response in valid DNSSEC zone should be SECURE', async () => {
const question = new Question('dnssec-deployment.org.', 'A');
Expand Down

0 comments on commit 5f0551a

Please sign in to comment.