##// END OF EJS Templates
tests: use pattern matching to mask `ECONNREFUSED` messages...
Matt Harbison -
r52835:73a43fe3 default
parent child Browse files
Show More
@@ -168,6 +168,12 substitutions = [
168 # FormatMessage(WSAEADDRNOTAVAIL)
168 # FormatMessage(WSAEADDRNOTAVAIL)
169 br'The requested address is not valid in its context',
169 br'The requested address is not valid in its context',
170 ),
170 ),
171 br'$ECONNREFUSED$': (
172 # strerror()
173 br'Connection refused',
174 # FormatMessage(WSAECONNREFUSED)
175 br'No connection could be made because the target machine actively refused it',
176 ),
171 }
177 }
172
178
173 for replace, msgs in _errors.items():
179 for replace, msgs in _errors.items():
@@ -618,15 +618,10 Invalid URL
618
618
619 No remote source
619 No remote source
620
620
621 #if windows
622 $ hg clone http://$LOCALIP:3121/a b
621 $ hg clone http://$LOCALIP:3121/a b
623 abort: error: * (glob)
622 abort: error: $ECONNREFUSED$
624 [100]
623 [100]
625 #else
624
626 $ hg clone http://$LOCALIP:3121/a b
627 abort: error: *refused* (glob)
628 [100]
629 #endif
630 $ rm -rf b # work around bug with http clone
625 $ rm -rf b # work around bug with http clone
631
626
632
627
@@ -78,7 +78,7 Server is not running aborts
78 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
78 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
79 $ hg clone http://localhost:$HGPORT server-not-runner
79 $ hg clone http://localhost:$HGPORT server-not-runner
80 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
80 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
81 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?\$EADDRNOTAVAIL\$|.* No route to host) (re)
81 error fetching bundle: (.*\$ECONNREFUSED\$|Protocol not supported|(.* )?\$EADDRNOTAVAIL\$|.* No route to host) (re)
82 abort: error applying bundle
82 abort: error applying bundle
83 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
83 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
84 [255]
84 [255]
@@ -81,7 +81,7 bad host:port for proxy ("Protocol not s
81 misconfigured hosts)
81 misconfigured hosts)
82
82
83 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
83 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
84 abort: error: (Connection refused|Protocol not supported|.* actively refused it|\$EADDRNOTAVAIL\$|No route to host) (re)
84 abort: error: (\$ECONNREFUSED\$|Protocol not supported|.* actively refused it|\$EADDRNOTAVAIL\$|No route to host) (re)
85 [100]
85 [100]
86
86
87 do not use the proxy if it is in the no list
87 do not use the proxy if it is in the no list
@@ -99,7 +99,7 do not use the proxy if it is in the no
99 proxy can't connect to server
99 proxy can't connect to server
100
100
101 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT2/ h
101 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT2/ h
102 abort: HTTP Error 404: Connection refused
102 abort: HTTP Error 404: $ECONNREFUSED$
103 [100]
103 [100]
104
104
105 $ cat proxy.log
105 $ cat proxy.log
@@ -118,5 +118,5 proxy can't connect to server
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
119 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
119 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
120 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
120 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
121 * - - [*] code 404, message Connection refused (glob)
121 * - - [*] code 404, message $ECONNREFUSED$ (glob)
122 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT2/?cmd=capabilities HTTP/1.1" 404 - (glob)
122 $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT2/?cmd=capabilities HTTP/1.1" 404 - (glob)
@@ -490,7 +490,7 Test when proxy can't connect to server
490
490
491 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure https://localhost:0/
491 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure https://localhost:0/
492 pulling from https://localhost:0/
492 pulling from https://localhost:0/
493 abort: error: Tunnel connection failed: 404 (Connection refused|\$EADDRNOTAVAIL\$) (re)
493 abort: error: Tunnel connection failed: 404 (\$ECONNREFUSED\$|\$EADDRNOTAVAIL\$) (re)
494 [100]
494 [100]
495
495
496
496
@@ -83,7 +83,7 Reasonable hint for a misconfigured blob
83 [50]
83 [50]
84
84
85 $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT2/missing
85 $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT2/missing
86 abort: LFS error: *onnection *refused* (glob) (?)
86 abort: LFS error: $ECONNREFUSED$ (?)
87 abort: LFS error: $EADDRNOTAVAIL$ (glob) (?)
87 abort: LFS error: $EADDRNOTAVAIL$ (glob) (?)
88 abort: LFS error: No route to host (?)
88 abort: LFS error: No route to host (?)
89 (the "lfs.url" config may be used to override http://localhost:$HGPORT2/missing)
89 (the "lfs.url" config may be used to override http://localhost:$HGPORT2/missing)
General Comments 0
You need to be logged in to leave comments. Login now