test: skip IPv6 part before testing it

PR-URL: https://github.com/nodejs/io.js/pull/2226
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
Sakthipriyan Vairamani 2015-07-23 01:28:30 +05:30
parent 93660c8b8e
commit 4e78cd71c0

View File

@ -19,6 +19,11 @@ server_ipv4.listen(common.PORT, common.localhostIPv4, function() {
server_ipv4.close();
});
if (!common.hasIPv6) {
console.log('1..0 # Skipped: ipv6 part of test, no IPv6 support');
return;
}
// Test on IPv6 Server
var localhost_ipv6 = '::1';
var family_ipv6 = 'IPv6';
@ -36,11 +41,6 @@ server_ipv6.listen(common.PORT, localhost_ipv6, function() {
server_ipv6.close();
});
if (!common.hasIPv6) {
console.log('1..0 # Skipped: ipv6 part of test, no IPv6 support');
return;
}
// Test without hostname or ip
var anycast_ipv6 = '::';
var server1 = net.createServer();