test: handle IPv6 localhost issues within tests
The issue of hosts that do not resolve `localhost` to `::1` is now handled within the tests. Remove flaky status for test-https-connect-address-family and test-tls-connect-address-family. PR-URL: https://github.com/nodejs/node/pull/7766 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
8c0f776f23
commit
814b8c3cf7
@ -12,13 +12,6 @@ test-tick-processor : PASS,FLAKY
|
||||
[$system==linux]
|
||||
test-tick-processor : PASS,FLAKY
|
||||
|
||||
# Flaky until https://github.com/nodejs/build/issues/415 is resolved.
|
||||
# On some of the buildbots, AAAA queries for localhost don't resolve
|
||||
# to an address and neither do any of the alternatives from the
|
||||
# localIPv6Hosts list from test/common.js.
|
||||
test-https-connect-address-family : PASS,FLAKY
|
||||
test-tls-connect-address-family : PASS,FLAKY
|
||||
|
||||
[$system==macos]
|
||||
|
||||
[$system==solaris] # Also applies to SmartOS
|
||||
|
@ -36,8 +36,13 @@ function runTest() {
|
||||
}
|
||||
|
||||
dns.lookup('localhost', {family: 6, all: true}, (err, addresses) => {
|
||||
if (err)
|
||||
if (err) {
|
||||
if (err.code === 'ENOTFOUND') {
|
||||
common.skip('localhost does not resolve to ::1');
|
||||
return;
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (addresses.some((val) => val.address === '::1'))
|
||||
runTest();
|
||||
|
@ -35,8 +35,13 @@ function runTest() {
|
||||
}
|
||||
|
||||
dns.lookup('localhost', {family: 6, all: true}, (err, addresses) => {
|
||||
if (err)
|
||||
if (err) {
|
||||
if (err.code === 'ENOTFOUND') {
|
||||
common.skip('localhost does not resolve to ::1');
|
||||
return;
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (addresses.some((val) => val.address === '::1'))
|
||||
runTest();
|
||||
|
Loading…
x
Reference in New Issue
Block a user