tests: followup on network related errors on Debian 9
authorBoris Feld <boris.feld@octobus.net>
Sun, 16 Dec 2018 18:51:48 +0000
changeset 40973 97484e1d1834
parent 40972 2393c4044214
child 40974 e1f759f1f691
tests: followup on network related errors on Debian 9 First, update test-clonebundles.t which was failing since the introduction of the `$EADDRNOTAVAIL$` common pattern. Also update two tests from 8695fbe17f7c with a more compact condition line. Differential Revision: https://phab.mercurial-scm.org/D5445
tests/test-clonebundles.t
tests/test-http-bad-server.t
tests/test-http-proxy.t
--- a/tests/test-clonebundles.t	Sun Dec 16 17:55:08 2018 +0900
+++ b/tests/test-clonebundles.t	Sun Dec 16 18:51:48 2018 +0000
@@ -64,7 +64,7 @@
   $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
   $ hg clone http://localhost:$HGPORT server-not-runner
   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
-  error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re)
+  error fetching bundle: (.* refused.*|Protocol not supported|(.* )?\$EADDRNOTAVAIL\$) (re)
   abort: error applying bundle
   (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
   [255]
--- a/tests/test-http-bad-server.t	Sun Dec 16 17:55:08 2018 +0900
+++ b/tests/test-http-bad-server.t	Sun Dec 16 18:51:48 2018 +0000
@@ -38,8 +38,7 @@
   $ cat hg.pid > $DAEMON_PIDS
 
   $ hg clone http://localhost:$HGPORT/ clone
-  abort: error: $ECONNRESET$ (?)
-  abort: error: $EADDRNOTAVAIL$ (?)
+  abort: error: (\$ECONNRESET\$|\$EADDRNOTAVAIL\$) (re)
   [255]
 
 (The server exits on its own, but there is a race between that and starting a new server.
--- a/tests/test-http-proxy.t	Sun Dec 16 17:55:08 2018 +0900
+++ b/tests/test-http-proxy.t	Sun Dec 16 18:51:48 2018 +0000
@@ -90,8 +90,7 @@
 misconfigured hosts)
 
   $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
-  abort: error: (Connection refused|Protocol not supported|.* actively refused it) (re) (?)
-  abort: error: $EADDRNOTAVAIL$ (?)
+  abort: error: (Connection refused|Protocol not supported|.* actively refused it|\$EADDRNOTAVAIL\$) (re)
   [255]
 
 do not use the proxy if it is in the no list