test: Introduce knowledge of FreeBSD jails
authorJohan Bergström <bugs@bergstroem.nu>
Tue, 17 Mar 2015 01:06:48 +0000 (12:06 +1100)
committerJohan Bergström <bugs@bergstroem.nu>
Wed, 18 Mar 2015 22:11:50 +0000 (09:11 +1100)
commitc15e81afdd5413f94df23eb82b6fc65875cb07fb
tree580f0433e3b1fff6693cce1dbb3de0682317df43
parentfe0f015c5159633127e268ebfc5db121883bc35c
test: Introduce knowledge of FreeBSD jails

FreeBSD jails act differently than your average vm or similar
application container. All routing passes through one ip address,
which makes things like localhost or 0.0.0.0 resolve differently.

Introduce a helper that allows us to verify if we're in a jail
and another one for returning an ip address for localhost.

Also, skip one test instead of trading additional complexity
in common.js for one specific user scenario.

PR-URL: https://github.com/iojs/io.js/pull/1167
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
test/common.js
test/parallel/test-dgram-address.js
test/parallel/test-dgram-bind-default-address.js
test/parallel/test-dgram-udp4.js
test/parallel/test-net-local-address-port.js
test/parallel/test-net-remote-address-port.js
test/sequential/test-net-server-address.js