Commit Graph

39 Commits (bfe04ed286ffc6b9cd95681599522c78cac364e3)

Author SHA1 Message Date
Ben Noordhuis 7266b75779 test: move broadcast/multicast test to internet/
Move parallel/test-dgram-broadcast-multi-process to test/internet.

The test does not play nice with firewalls that restrict broadcast
or multicast traffic, nor can it be rewritten to use only loopback
traffic without running into platform-specific limitations, see also
commits 52e600a and 236533c (TODO: update second one before landing.)

PR-URL: https://github.com/iojs/io.js/pull/259
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-08 13:17:32 +01: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
Fedor Indutny 045f765a1a test: add `reuseAddr` in dgram-multicast...
Add `reuseAddr` option in `test-dgram-multicast-multi-process.js`
2014-04-10 19:55:38 +04: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
Timothy J Fontaine 6cc95b06ea test: refactor to use common testcfg 2014-01-20 09:00:13 -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
Fedor Indutny 5977cba985 tls: reuse hostname from underlying net.Socket
When `tls.connect()` is called with `socket` option, it should try to
reuse hostname previously passed to `net.connect()` and only after that
fall back to `'localhost'`.

fix #6409
2013-10-31 01:57:17 +04: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
Koichi Kobayashi 72ad2c94df https: fix default port
https.get('https://github.com/') should use port 443, not 80.
2013-08-05 12:53:12 -07:00
Ben Noordhuis 14f45ba739 test: move two tests from simple/ to internet/
Fixes #5876.
2013-07-20 12:36:33 +02:00
Pavel Lang 2ad98725d6 DNS: Support NAPTR queries
They were previously removed in a90bc78534.
2013-03-06 14:31:22 +04:00
isaacs 1b870b6127 test: Move test-net-connect-timeout to test/internet
It is not a valid test unless you're connected to the internet, and causes
a lot of spurious failures on Linux anyway, as it's highly dependent on
timing of things that we don't have any control over.
2013-02-26 17:39:04 -08:00
Ben Noordhuis a39f669bc7 test: move simple/test-http-dns-fail to test/internet
The test times out when the upstream DNS resolver takes too long to
respond.

See #4672.
2013-01-28 12:41:56 +01: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
Ryan Dahl e8542b6220 Fix internet testcase config 2011-07-05 10:31:37 -07:00
Bert Belder 1e29fe65c3 Fix `make test-internet` 2011-07-05 01:53:01 +02:00
Bert Belder 858f23094e Bindings for libuv-integrated c-ares 2011-07-05 00:17:20 +02:00
Ryan Dahl 97255c2651 Fix test harness for Linux
Mostly just upgraded tools/test.py to the latest one that's in V8.  But also
fixing the before and after hooks to preserve the test/tmp directory so that
running tests manually usually works.
2010-10-18 14:54:39 -07:00
arlolra 04fac19822 Split tests. 2010-02-25 11:41:11 -08:00