summaryrefslogtreecommitdiff
path: root/test/internet
AgeCommit message (Collapse)Author
2019-01-28dns: use IDNA 2008 to encode non-ascii hostnamesBen Noordhuis
Before this commit, Node.js left it up to the system resolver or c-ares. Leaving it to the system resolver introduces platform differences because: * some support IDNA 2008 * some only IDNA 2003 (glibc until 2.28), and * some don't support IDNA at all (musl libc) c-ares doesn't support IDNA either although curl does, by virtue of linking against libidn2. Upgrading from libidn1 to libidn2 in order to get proper IDNA 2008 support was the fix for curl's CVE-2016-8625. libidn2 is not an option (incompatible license) but ICU has an IDNA API and we already use that in one place. For non-ICU builds, we fall back to the bundled punycode.js that also supports IDNA 2008. Fixes: https://github.com/nodejs-private/security/issues/97 Fixes: https://github.com/nodejs/node/issues/25558 PR-URL: https://github.com/nodejs/node/pull/25679 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-01-07test: tune test-uv-threadpool-scheduleRich Trott
test-uv-threadpool-schedule has been failing consistently in node-daily-master CI. It also fails consistently on my personal laptop. These changes make it pass consistently with current master but fail consistently with Node.js 10.11 (which was the last release in the 10.x line before the fix that the test is for). It succeeds/fails as expected whether or not I am connected to the network. Fixes: https://github.com/nodejs/node/issues/25305 PR-URL: https://github.com/nodejs/node/pull/25358 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-12-30test: regression test for uv threadpool congestionGireesh Punathil
Validate that massive dns lookups do not block filesytem I/O (or any fast I/O for that matter). Prior to https://github.com/libuv/libuv/pull/1845 few back-to-back dns lookup were sufficient to engage libuv threadpool workers in a blocking manner, throttling other work items that need the pool. this test acts as a regression test for the same. Start slow and fast I/Os together, and make sure fast I/O can complete in at least in 1/100th of time for slow I/O. Refs: https://github.com/libuv/libuv/pull/1845 Refs: https://github.com/nodejs/node/issues/8436 PR-URL: https://github.com/nodejs/node/pull/23099 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-12test: improve internet/test-dnsIlarion Halushka
* change 'for' loop to 'for of' loop * remove unused parameters passed to functions * remove unnecessary 'assert.ok' PR-URL: https://github.com/nodejs/node/pull/24927 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-17test: fixed the arguments order in `assert.strictEqual`Lakshmi Shanmugam
PR-URL: https://github.com/nodejs/node/pull/24414 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-06test: remove unused catch bindingscjihrig
PR-URL: https://github.com/nodejs/node/pull/24079 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-10-09benchmark,doc,lib,src,test,tools: fix typosBrandon Smith
PR-URL: https://github.com/nodejs/node/pull/23302 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-09-27test: add dns.onlookupall() to increase coverageMasashi Hirano
Added test that callback should be called when error occurs in dns.lookupall(). PR-URL: https://github.com/nodejs/node/pull/22985 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-18test: don't inspect values if not necessaryRuben Bridgewater
The inspection triggered on each assert call eagerly even tough the assertion was never triggered. That caused significant CPU overhead. PR-URL: https://github.com/nodejs/node/pull/22903 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-09-03test: fix test-trace-events-dnsRich Trott
Test is using `common.fileExists()` which has been removed. There is no need to check that the file exists as the attempt to read the file in the next line will fail if the file does not exist. Remove existence check. PR-URL: https://github.com/nodejs/node/pull/22674 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-02src: add trace points to dnsChin Huang
Add trace points to dns under node.dns.native category. Emit trace events for dns operations. Use the nestable async events instead of deprecated ones. Include test code to verify the trace log. The trace name is stored as const char* class variable. The test code is to check each operation in separate sync processes. Refs: https://github.com/nodejs/node/pull/19157 PR-URL: https://github.com/nodejs/node/pull/21840 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-08-31test: move test that depends on dns query to internetJoyee Cheung
These test cases in `test/parallel/test-dns-lookup.js` send dns requests and depend on the results, which could fail if the DNS service for invalid hosts is hijacked by the ISP. PR-URL: https://github.com/nodejs/node/pull/22516 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-30dns: make process.binding('cares_wrap') internalcjihrig
PR-URL: https://github.com/nodejs/node/pull/22474 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-08-14test: rename some allegoriesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/22307 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-07-26test: remove setTimeout in test-net-connect-unrefconectado
Removes the setTimeout since if the test were to fail it would time out due to the tools/test.py wrapper PR-URL: https://github.com/nodejs/node/pull/21969 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-21test: allow tests to pass without internetHelio Frota
PR-URL: https://github.com/nodejs/node/pull/21909 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-07-19test: make crashOnUnhandleRejection opt-outMichaël Zasso
This commit removes `common.crashOnUnhandledRejection()` and adds `common.disableCrashOnUnhandledRejection()`. To reduce the risk of mistakes and make writing tests that involve promises simpler, always install the unhandledRejection hook in tests and provide a way to disable it for the rare cases where it's needed. PR-URL: https://github.com/nodejs/node/pull/21849 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-20dns: add promisified dns modulecjihrig
PR-URL: https://github.com/nodejs/node/pull/21264 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-04test: update test-dns error messageRich Trott
test-dns is in the internet suite and therefore is rarely run. (That will change soon. We will run internet tests nightly in CI.) Because it is infrequently run, it was not noticed that it no longer passes. (An error message has changed to provide more information.) This change fixes the test so it passes. PR-URL: https://github.com/nodejs/node/pull/21116 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-10test: verify inspector help url workscjihrig
This commit adds basic functionality testing of the help URL printed when the inspector starts. PR-URL: https://github.com/nodejs/node/pull/19887 Refs: https://github.com/nodejs/node/pull/19871 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-01tools: add 'spaced-comment' into eslint rulesWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/19596 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-09test: refactor http-https-default-portsKen Lin
Use arrow functions. PR-URL: https://github.com/nodejs/node/pull/19130 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-16test: minor refactoringRuben Bridgewater
Add punctuation and comments about code that should not throw. Also remove a obsolete test and refactor some tests. PR-URL: https://github.com/nodejs/node/pull/18669 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-16test: remove assert.doesNotThrow()Ruben Bridgewater
There is actually no reason to use `assert.doesNotThrow()` in the tests. If a test throws, just let the error bubble up right away instead of first catching it and then rethrowing it. PR-URL: https://github.com/nodejs/node/pull/18669 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-07test: do not check TXT content in test-dns-anyJoyee Cheung
google.com added another TXT record which broke this test. This removes the check on the content of the TXT record since that depends on an external state subject to change. PR-URL: https://github.com/nodejs/node/pull/18547 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-18test: remove trivial buffer importssreepurnajasti
Refs: #13836 PR-URL: https://github.com/nodejs/node/pull/18034 Refs: https://github.com/nodejs/node/issues/13836 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-17test: use shorthand propertiesTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18105 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-06dns: fix crash while setting server during queryXadillaX
Fix this issue follow these two points: 1. Keep track of how many queries are currently open. If `setServers()` is called while there are open queries, error out. 2. For `Resolver` instances, use option 1. For dns.setServers(), just create a fresh new default channel every time it is called, and then set its servers list. PR-URL: https://github.com/nodejs/node/pull/14891 Fixes: https://github.com/nodejs/node/issues/14734 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-11-08test: use internet.addresses in internet testsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/16390 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-28test: show values instead of assertion messageCheyenne Arrowsmith
PR-URL: https://github.com/nodejs/node/pull/15979 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-26test: allow tests to pass without internetDaniel Bevenius
Currently when running the test without an internet connection there are two JavaScript test failures and one cctest. The cctest only fails on Mac as far as I know. (I've only tested using Mac and Linux thus far). This commit moves the two JavaScript tests to test/internet. The details for test_inspector_socket_server.cc: [ RUN ] InspectorSocketServerTest.FailsToBindToNodejsHost make[1]: *** [cctest] Segmentation fault: 11 make: *** [test] Error 2 lldb output: [ RUN ] InspectorSocketServerTest.FailsToBindToNodejsHost Process 63058 stopped * thread #1: tid = 0x7b175, 0x00007fff96d04384 * libsystem_info.dylib`_gai_simple + 87, queue = * 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, * address=0x0) frame #0: 0x00007fff96d04384 libsystem_info.dylib`_gai_simple + 87 libsystem_info.dylib`_gai_simple: -> 0x7fff96d04384 <+87>: movw (%rdx), %ax 0x7fff96d04387 <+90>: movw %ax, -0x2a(%rbp) 0x7fff96d0438b <+94>: movq %r13, -0x38(%rbp) 0x7fff96d0438f <+98>: movq 0x18(%rbp), %rcx (lldb) bt * thread #1: tid = 0x7b175, 0x00007fff96d04384 * libsystem_info.dylib`_gai_simple + 87, queue = * 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, * address=0x0) * frame #0: 0x00007fff96d04384 libsystem_info.dylib`_gai_simple + 87 frame #1: 0x00007fff96cfe98b libsystem_info.dylib`search_addrinfo + 179 frame #2: 0x00007fff96cfafef libsystem_info.dylib`si_addrinfo + 2255 frame #3: 0x00007fff96cfa67b libsystem_info.dylib`getaddrinfo + 179 frame #4: 0x00000001017d8888 cctest`uv__getaddrinfo_work(w=0x00007fff5fbfe210) + 72 at getaddrinfo.c:102 frame #5: 0x00000001017d880e cctest`uv_getaddrinfo(loop=0x000000010287cb80, req=0x00007fff5fbfe1c8, cb=0x0000000000000000, hostname="nodejs.org", service="0", hints=0x00007fff5fbfe268) + 734 at getaddrinfo.c:192 frame #6: 0x000000010171f781 cctest`node::inspector::InspectorSocketServer::Start(this=0x00007fff5fbfe658) + 801 at inspector_socket_server.cc:398 frame #7: 0x00000001016ed590 cctest`InspectorSocketServerTest_FailsToBindToNodejsHost_Test::TestBody(this=0x0000000105001fd0) + 288 at test_inspector_socket_server.cc:593 I'm not sure about the exact cause for this but when using a standalone c program to simulate this it seems like when the ai_flags `AI_NUMERICSERV` is set, which is done in inspector_socket_server.cc line 394, the servname (the port in the FailsToBindToNodejsHost test) is expected to be a numeric port string to avoid looking it up in /etc/services. When the port is 0 as is it was before this commit the segment fault occurs but not if it is non-zero. PR-URL: https://github.com/nodejs/node/pull/16255 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-18test: improve assert message in internet testNikki St Onge
PR-URL: https://github.com/nodejs/node/pull/15998 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-14dgram: added setMulticastInterface()Will Young
Add wrapper for uv's uv_udp_set_multicast_interface which provides the sender side mechanism to explicitly select an interface. The equivalent receiver side mechanism is the optional 2nd argument of addMembership(). PR-URL: https://github.com/nodejs/node/pull/7855 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-27test: continue normalizing fixtures useMiguel Angel Asencio Hurtado
PR-URL: https://github.com/nodejs/node/pull/14716 Refs: https://github.com/nodejs/node/pull/14332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-08-23dns: add `verbatim` option to dns.lookup()Ben Noordhuis
When true, results from the DNS resolver are passed on as-is, without the reshuffling that Node.js otherwise does that puts IPv4 addresses before IPv6 addresses. PR-URL: https://github.com/nodejs/node/pull/14731 Ref: https://github.com/nodejs/node/issues/6307 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-19test: use invalid host according to RFC2606Tobias Nießen
PR-URL: https://github.com/nodejs/node/pull/14863 Refs: https://github.com/nodejs/node/pull/14781 Refs: https://tools.ietf.org/html/rfc2606#section-2 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2017-07-21lib,src: fix consistent spacing inside bracesSebastiaan Deckers
PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-04test: simplify test skippingVse Mozhet Byt
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: https://github.com/nodejs/node/pull/14021 Fixes: https://github.com/nodejs/node/issues/14016 Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-04test: fix require nits in some test-tls-* testsVse Mozhet Byt
* Do not require if test is skipped. * Do not re-require without need. * Sort requiring by module names. PR-URL: https://github.com/nodejs/node/pull/14008 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-02test: replace indexOf with includes and startsWithNataly Shrits
PR-URL: https://github.com/nodejs/node/pull/13852 Refs: https://github.com/nodejs/node/issues/12586 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-24test: remove unnecessary Buffer importSteven Winston
Removed require('buffer') from - test/disabled/test-sendfd.js - test/internet/test-dgram-broadcast-multi-process.js - test/pummel/test-https-no-reader.js PR-URL: https://github.com/nodejs/node/pull/13860 Refs: https://github.com/nodejs/node/issues/13836 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-09dns: add resolveAny supportXadillaX
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior like `$ dig <domain> any` and returns an array with several types of records. `dns.resolveAny` parses the result packet by several rules in turn. Supported types: * A * AAAA * CNAME * MX * NAPTR * NS * PTR * SOA * SRV * TXT Fixes: https://github.com/nodejs/node/issues/2848 PR-URL: https://github.com/nodejs/node/pull/13137 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2017-06-01test: improve dns internet test caseBrian White
0.0.0.0 is more common than other special ipv4 addresses, so it is possible that we may not get ENOTFOUND for such addresses. Instead, this commit uses a less common address that is reserved for documentation (RFC) use only. PR-URL: https://github.com/nodejs/node/pull/13261 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-24test: refactor test-dnsRich Trott
* track callback invocations with common.mustCall() and common.mustNotCall() * remove test in test/internet/test-dns.js that is duplicated in test/parallel/test-dns.js * move tests that might perform a DNS query from test test/parallel/test-dns.js to test/internet/test-dns.js PR-URL: https://github.com/nodejs/node/pull/13163 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-18dns: fix crash using dns.setServers after resolve4XadillaX
The callback function in cares_query is synchronous and called before closed. So dns.setServers in the synchronous callback before closed will occur crashing. Fixes: https://github.com/nodejs/node/issues/894 Refs: https://github.com/nodejs/node/blob/v6.9.4/deps/cares/src/ares_process.c#L1332-L1333 Refs: https://github.com/OpenSIPS/opensips/blob/2.3.0/proxy.c PR-URL: https://github.com/nodejs/node/pull/13050 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-05-18test: refactor test-dns-regress-6244.jsRich Trott
* Move from parallel to internet because it performs a DNS query * Provide link to relevant issue in comments * Remove unnecessary explicit no-op function PR-URL: https://github.com/nodejs/node/pull/13058 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-09dns: support promisified `lookup(Service)`Anna Henningsen
PR-URL: https://github.com/nodejs/node/pull/12442 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: William Kapke <william.kapke@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2017-05-05test: reduce string concatenationsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/12735 Refs: https://github.com/nodejs/node/pull/12455 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-12test: remove common.fail()Rich Trott
common.fail() was added to paste over issues with assert.fail() function signature. assert.fail() has been updated to accept a single argument so common.fail() is no longer necessary. PR-URL: https://github.com/nodejs/node/pull/12293 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-10meta: restore original copyright headerJames M Snell
A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.