runtests: always set web.ipv6
authorJun Wu <quark@fb.com>
Thu, 16 Feb 2017 08:43:59 -0800
changeset 31010 09ec648cd2a9
parent 31009 161ab32b44a1
child 31011 01eebb65a61d
runtests: always set web.ipv6 Previously, we only set web.ipv6 if IPv6 is used, but not on the IPv4 case. Since we already have set web.address, it makes sense to move "web.ipv6" out from "extra config options".
tests/run-tests.py
tests/test-basic.t
tests/test-commandserver.t
--- a/tests/run-tests.py	Thu Feb 16 00:13:29 2017 -0800
+++ b/tests/run-tests.py	Thu Feb 16 08:43:59 2017 -0800
@@ -599,11 +599,6 @@
         self._testtmp = None
         self._chgsockdir = None
 
-        # If IPv6 is used, set web.ipv6=1 in hgrc so servers will use IPv6
-        if useipv6:
-            self._extraconfigopts = list(self._extraconfigopts)
-            self._extraconfigopts.append('web.ipv6 = True')
-
         # If we're not in --debug mode and reference output file exists,
         # check test output against it.
         if debug:
@@ -935,6 +930,7 @@
                    (os.path.join(self._testtmp, b'.cache/largefiles')))
         hgrc.write(b'[web]\n')
         hgrc.write(b'address = localhost\n')
+        hgrc.write(b'ipv6 = %s\n' % self._useipv6)
 
         for opt in self._extraconfigopts:
             section, key = opt.split('.', 1)
--- a/tests/test-basic.t	Thu Feb 16 00:13:29 2017 -0800
+++ b/tests/test-basic.t	Thu Feb 16 08:43:59 2017 -0800
@@ -12,7 +12,7 @@
   ui.mergemarkers=detailed
   ui.promptecho=True
   web.address=localhost
-  web.ipv6=True (?)
+  web\.ipv6=(?:True|False) (re)
   $ hg init t
   $ cd t
 
--- a/tests/test-commandserver.t	Thu Feb 16 00:13:29 2017 -0800
+++ b/tests/test-commandserver.t	Thu Feb 16 08:43:59 2017 -0800
@@ -200,7 +200,7 @@
   ui.foo=bar
   ui.nontty=true
   web.address=localhost
-  web.ipv6=True (?)
+  web\.ipv6=(?:True|False) (re)
   *** runcommand init foo
   *** runcommand -R foo showconfig ui defaults
   defaults.backout=-d "0 0"