0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
Brendan Ashworth
8af5962608 test: add spaces after keywords
eg changes:

  if(x) { ... }

to:

  if (x) { ... }
2015-08-22 18:01:53 -07:00
Roman Reiss
f29762f4dd test: enable linting for tests
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.

test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.

PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-19 21:21:27 +02:00
Roman Reiss
633a990848 dns: allow dns.lookup() to return all addresses
This commit adds the 'all' option to dns.lookup(), allowing
all lookup results to be returned.

Semver: Minor
Fixes: https://github.com/iojs/io.js/issues/736
PR-URL: https://github.com/iojs/io.js/pull/744
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-06 17:18:47 -05:00
isaacs
3e1b1dd4a9 Remove excessive copyright/license boilerplate
The copyright and license notice is already in the LICENSE file.  There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
2015-01-12 15:30:28 -08:00
Trevor Norris
819690fd98 src: all wraps now use actual FunctionTemplate
Instead of simply creating a new v8::Object to contain the connection
information, instantiate a new instance of a FunctionTemplate. This will
allow future improvements for debugging and performance probes.

Additionally, the "provider" argument in the ReqWrap constructor is no
longer optional.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-09 17:57:15 +01:00
Maciej Małecki
174f7d2820 dns: include host name in error message if available
This makes errors more readable and similar to FS errors, which also
include file name.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-09-16 15:32:04 +04:00
Alexis Campailla
0d357fa135 test: fix dns test
Fix a few issues in test/internet/test-dns.js:
- 'hint' should be 'hints'
- reverse name lookup is not guaranteed to return 'localhost'
- V4MAPPED hint requires IPV6 address family

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-08-13 11:44:20 -07:00
Julien Gilli
f5f5bd76e6 tests: do not hardcode service name in test-dns.
Instead of hard-coding http service name in test-dns, retrieve it from
/etc/services. This is not ideal, but it's still better than hard-coding
it.

Fixes #8047.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-08-13 11:43:41 -07:00
cjihrig
430678640c net: don't prefer IPv4 addresses during resolution
Currently the address resolution family defaults to IPv4. Instead remove
the preference and instead resolve to a family suitable for the host.

Expose the getaddrinfo flags and allow them to be passed.

Add documentation about new flags.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-08-04 16:57:18 -07:00
Julien Gilli
0381cf5698 tests: fix internet/test-dns.js
internet/test-dns.js assumes that ::1 always resolves to "localhost" on
all platforms. This is not what happens in reality. Some platforms
resolve it to "ip6-localhost" too. There doesn't seem to be any consensus
on what's the right thing to do. However, most sane platforms will use
either one of these two values.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-07-30 15:10:05 -07:00
Saúl Ibarra Corretgé
35b9580cd8
dns: introduce lookupService function
Uses getnameinfo to resolve an address an port into a hostname and
service.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-27 04:02:19 +04:00
Timothy J Fontaine
7b72e15665 test: update test-dns.js after a60a9b0
resolveTxt now returns a 2-d array for all the chunks string chunks
relating to the record
2014-04-30 09:14:55 -07:00
Timothy J Fontaine
98a0909da0 test: internet/test-dns disable implicit ipv6
This ends up being too difficult to test across different deployments
2014-02-25 13:44:37 -08:00
Timothy J Fontaine
265fdc8e91 test: internet/test-dns handle ESERVFAIL
ESERVFAIL is also an acceptable error code when failing to resolve a
domain.
2014-02-24 17:53:57 -08:00
Tuğrul Topuz
bddea032b7 dns: add resolveSoa and 'SOA' rrtype
You can now query for SOA records by either passing 'SOA' to `resolve`
or by using the new `resolveSoa`
2013-12-31 14:30:40 -08:00
Ben Noordhuis
a2d1cbef6b dns: set hostname property on error object
Make debugging and logging easier: when a DNS lookup for a hostname
fails, set the hostname as a property on the error object.

Fixes #5393.
2013-10-16 21:56:16 +02:00
Ben Noordhuis
4ffa943c3f test: fix up internet/test-dns after api change
* The test calls an internal API that changed in commit ca9eb71.

* Trying to reverse-lookup a bogus hostname now returns EINVAL rather
  than the (bogus!) status code ENOTIMP.
2013-08-12 17:33:59 +02:00
Pavel Lang
2ad98725d6 DNS: Support NAPTR queries
They were previously removed in a90bc78534.
2013-03-06 14:31:22 +04:00
Dan Milon
7295bb9435 dns: make error message match errno 2013-01-18 12:13:32 +01:00
Bert Belder
b5db5fc9dc test: pick another CNAME record to test dns queries
Google.com no longer has a CNAME record.
2012-09-26 01:57:24 +02:00
isaacs
a90bc78534 Revert "DNS: Support NAPTR queries"
This reverts commit 91bf18fcc5.
2012-06-16 11:02:49 -07:00
ssuda
91bf18fcc5 DNS: Support NAPTR queries
Adding support for NAPTR records
fixes #3170
2012-06-16 10:56:49 -07:00
Ben Noordhuis
7f4aba91d3 test: include common.js in all tests 2012-02-20 13:29:11 +01:00
Andreas Madsen
4865063924 Tests: fix jslint issues 2012-01-17 19:45:09 +01:00
Ryan Dahl
be2320d408 Add binding to uv_getaddrinfo 2011-10-20 15:06:53 -07:00
Ryan Dahl
9631e29933 Remove tests relying on !process.features.uv 2011-10-11 14:47:02 -07:00
Colton Baker
87286cc737 Fixed a lot of jslint errors.
Fixes #1831
2011-10-05 18:51:06 -07:00
Ben Noordhuis
976c6b0826 test: add TXT DNS record lookup test 2011-10-03 16:50:09 +02:00
Ben Noordhuis
aa0308d618 process: add process.features, remove process.useUV
Partially fixes #1385.
2011-07-23 23:16:48 +02:00
Bert Belder
72e18d7f19 dns_uv: match the old api better, fix tests 2011-07-05 21:17:17 +02:00
Bert Belder
858f23094e Bindings for libuv-integrated c-ares 2011-07-05 00:17:20 +02:00