comparison tests/test-clonebundles.t @ 26952:4e566f513fd8

tests: tolerate differences between Linux and Windows error strings These are related to differences in how missing files and network connection failures are displayed. I opted to combine the strings in one line instead of using '#if windows' blocks around entire commands in order to avoid future changes being accidentally missed in the Windows sections. Globbing away the entire output seemed wrong, as it could mask other failures. The raw messages involved are: Linux Windows "* not known" <-> "getaddrinfo failed" "Connection refused" <-> "No connection could be made because the target machine actively refused it" "No such file or directory" <-> "The system cannot find the file specified" Issue 4941 indicates that NetBSD has yet another string for "* not known". Also, the histedit test shows that the missing file is printed first on Windows, last on Linux. That is controlled in windows.py:posixfile if we care to change it.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 09 Nov 2015 13:12:35 -0500
parents eb49ffa39fe2
children 77d25b913f80
comparison
equal deleted inserted replaced
26951:af1ae4ee755c 26952:4e566f513fd8
82 Manifest file with invalid URL aborts 82 Manifest file with invalid URL aborts
83 83
84 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest 84 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
85 $ hg clone http://localhost:$HGPORT 404-url 85 $ hg clone http://localhost:$HGPORT 404-url
86 applying clone bundle from http://does.not.exist/bundle.hg 86 applying clone bundle from http://does.not.exist/bundle.hg
87 error fetching bundle: * not known (glob) 87 error fetching bundle: (.* not known|getaddrinfo failed) (re)
88 abort: error applying bundle 88 abort: error applying bundle
89 (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false") 89 (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
90 [255] 90 [255]
91 91
92 Server is not running aborts 92 Server is not running aborts
93 93
94 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest 94 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
95 $ hg clone http://localhost:$HGPORT server-not-runner 95 $ hg clone http://localhost:$HGPORT server-not-runner
96 applying clone bundle from http://localhost:$HGPORT1/bundle.hg 96 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
97 error fetching bundle: Connection refused 97 error fetching bundle: * refused* (glob)
98 abort: error applying bundle 98 abort: error applying bundle
99 (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false") 99 (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
100 [255] 100 [255]
101 101
102 Server returns 404 102 Server returns 404