Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use .test domain for not found address #38286

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Conversation

richardlau
Copy link
Member

@richardlau richardlau commented Apr 18, 2021

While it is extremely unlikely that .fhqwhgads will become a valid
domain, we should, where possible, use one of the reserved domains for
testing.

Refs: https://tools.ietf.org/html/rfc2606
Refs: #38282

cc @Trott

iojs@test-digitalocean-ubuntu1804-x64-1:~/build/workspace/node-test-commit-custom-suites-freestyle$ ./node 
Welcome to Node.js v16.0.0-pre.
Type ".help" for more information.
> const opts = { hints: 0, family: 0, all: false }
undefined
>  dns.promises.lookup('something.invalid', opts)
Promise { <pending> }
> Uncaught Error: getaddrinfo EAI_AGAIN something.invalid
    at __node_internal_captureLargerStackTrace (node:internal/errors:456:5)
    at __node_internal_ (node:internal/errors:678:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:internal/dns/promises:42:17)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:135:14) {
  errno: -3001,
  code: 'EAI_AGAIN',
  syscall: 'getaddrinfo',
  hostname: 'something.invalid'
}
>  dns.promises.lookup('something.invalid.test', opts)
Promise { <pending> }
> Uncaught Error: getaddrinfo ENOTFOUND something.invalid.test
    at __node_internal_captureLargerStackTrace (node:internal/errors:456:5)
    at __node_internal_ (node:internal/errors:678:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:internal/dns/promises:42:17)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:135:14) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'something.invalid.test'
}
>  dns.promises.lookup('something.invalid.example', opts)
Promise { <pending> }
> Uncaught Error: getaddrinfo ENOTFOUND something.invalid.example
    at __node_internal_captureLargerStackTrace (node:internal/errors:456:5)
    at __node_internal_ (node:internal/errors:678:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:internal/dns/promises:42:17)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:135:14) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'something.invalid.example'
}
> dns.promises.resolveMx('something.invalid')
Promise { <pending> }
> Uncaught Error: queryMx ESERVFAIL something.invalid
    at __node_internal_captureLargerStackTrace (node:internal/errors:456:5)
    at __node_internal_ (node:internal/errors:678:10)
    at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:169:17)
    at QueryReqWrap.callbackTrampoline (node:internal/async_hooks:135:14) {
  errno: undefined,
  code: 'ESERVFAIL',
  syscall: 'queryMx',
  hostname: 'something.invalid'
}
> dns.promises.resolveMx('something.test')
Promise { <pending> }
> Uncaught Error: queryMx ENOTFOUND something.test
    at __node_internal_captureLargerStackTrace (node:internal/errors:456:5)
    at __node_internal_ (node:internal/errors:678:10)
    at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:169:17)
    at QueryReqWrap.callbackTrampoline (node:internal/async_hooks:135:14) {
  errno: undefined,
  code: 'ENOTFOUND',
  syscall: 'queryMx',
  hostname: 'something.test'
}
> dns.promises.resolveMx('something.example')
Promise { <pending> }
> #Uncaught Error: queryMx ENOTFOUND something.example
    at __node_internal_captureLargerStackTrace (node:internal/errors:456:5)
    at __node_internal_ (node:internal/errors:678:10)
    at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:169:17)
    at QueryReqWrap.callbackTrampoline (node:internal/async_hooks:135:14) {
  errno: undefined,
  code: 'ENOTFOUND',
  syscall: 'queryMx',
  hostname: 'something.example'
}
>

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Apr 18, 2021
@nodejs-github-bot
Copy link
Collaborator

@richardlau
Copy link
Member Author

richardlau commented Apr 18, 2021

@richardlau richardlau added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 18, 2021
While it is extremely unlikely that `.fhqwhgads` will become a valid
domain, we should, where possible, use one of the reserved domains for
testing.

Refs: https://tools.ietf.org/html/rfc2606

PR-URL: nodejs#38286
Refs: nodejs#38282
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@richardlau
Copy link
Member Author

Landed in 8645a36

@richardlau richardlau merged commit 8645a36 into nodejs:master Apr 21, 2021
@richardlau richardlau deleted the dns branch April 21, 2021 20:49
targos pushed a commit that referenced this pull request Apr 29, 2021
While it is extremely unlikely that `.fhqwhgads` will become a valid
domain, we should, where possible, use one of the reserved domains for
testing.

Refs: https://tools.ietf.org/html/rfc2606

PR-URL: #38286
Refs: #38282
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@targos targos mentioned this pull request May 3, 2021
targos pushed a commit that referenced this pull request May 30, 2021
While it is extremely unlikely that `.fhqwhgads` will become a valid
domain, we should, where possible, use one of the reserved domains for
testing.

Refs: https://tools.ietf.org/html/rfc2606

PR-URL: #38286
Refs: #38282
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Jun 5, 2021
While it is extremely unlikely that `.fhqwhgads` will become a valid
domain, we should, where possible, use one of the reserved domains for
testing.

Refs: https://tools.ietf.org/html/rfc2606

PR-URL: #38286
Refs: #38282
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Jun 11, 2021
While it is extremely unlikely that `.fhqwhgads` will become a valid
domain, we should, where possible, use one of the reserved domains for
testing.

Refs: https://tools.ietf.org/html/rfc2606

PR-URL: #38286
Refs: #38282
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants