diff tests/test-archive.t @ 31028:636cf3f7620d

tests: use LOCALIP This patch replaces hardcoded 127.0.0.1 with $LOCALIP in all tests. Till now, the IPv6 series should make tests pass on common IPv6 systems where the local device has the address "::1" and the hostname "localhost" resolves to "::1".
author Jun Wu <quark@fb.com>
date Thu, 16 Feb 2017 09:38:52 -0800
parents b3d2e8cce78c
children 75be14993fda
line wrap: on
line diff
--- a/tests/test-archive.t	Wed Feb 15 23:24:03 2017 -0800
+++ b/tests/test-archive.t	Thu Feb 16 09:38:52 2017 -0800
@@ -99,7 +99,7 @@
   > except AttributeError:
   >     stdout = sys.stdout
   > try:
-  >     f = util.urlreq.urlopen('http://127.0.0.1:%s/?%s'
+  >     f = util.urlreq.urlopen('http://$LOCALIP:%s/?%s'
   >                     % (os.environ['HGPORT'], requeststr))
   >     stdout.write(f.read())
   > except util.urlerr.httperror as e: