[PATCH] tests: relax "Connection refused" match

Augie Fackler raf at durin42.com
Tue Jul 12 11:20:42 EDT 2016


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1468336830 14400
#      Tue Jul 12 11:20:30 2016 -0400
# Node ID 93b3703c8e5856932b6cc83e45ad635b4eb5f5d1
# Parent  be68a44450416581227c43216f07ad8a71e550bc
tests: relax "Connection refused" match

We already had the match relaxed on Windows, but on Google Compute
Engine VMs I'm seeing "Network is unreachable" instead of "Connection
refused". At this point, just give up and make sure we get an error back.

diff --git a/tests/test-bad-pull.t b/tests/test-bad-pull.t
--- a/tests/test-bad-pull.t
+++ b/tests/test-bad-pull.t
@@ -1,14 +1,8 @@
 #require serve killdaemons
 
-#if windows
   $ hg clone http://localhost:$HGPORT/ copy
   abort: * (glob)
   [255]
-#else
-  $ hg clone http://localhost:$HGPORT/ copy
-  abort: error: Connection refused
-  [255]
-#endif
 
   $ test -d copy
   [1]
diff --git a/tests/test-static-http.t b/tests/test-static-http.t
--- a/tests/test-static-http.t
+++ b/tests/test-static-http.t
@@ -1,14 +1,8 @@
 #require killdaemons
 
-#if windows
   $ hg clone http://localhost:$HGPORT/ copy
   abort: * (glob)
   [255]
-#else
-  $ hg clone http://localhost:$HGPORT/ copy
-  abort: error: Connection refused
-  [255]
-#endif
   $ test -d copy
   [1]
 


More information about the Mercurial-devel mailing list