comparison tests/test-https.t @ 29445:072e4a595607

tests: add test for empty CA certs file smf reported that an environment with no loaded CA certs resulted in a weird error. I'd like to detect this a bit better so we can display an actionable error message. The actual error being globbed over in this patch is "unknown error" with a ssl.c line number. That isn't useful at all.
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 29 Jun 2016 18:15:28 -0700
parents e1778b9c8d53
children 2f7f1e10f840
comparison
equal deleted inserted replaced
29444:284d742e5611 29445:072e4a595607
177 $ P="$CERTSDIR" hg -R copy-pull pull --insecure 177 $ P="$CERTSDIR" hg -R copy-pull pull --insecure
178 pulling from https://localhost:$HGPORT/ 178 pulling from https://localhost:$HGPORT/
179 warning: connection security to localhost is disabled per current settings; communication is susceptible to eavesdropping and tampering 179 warning: connection security to localhost is disabled per current settings; communication is susceptible to eavesdropping and tampering
180 searching for changes 180 searching for changes
181 no changes found 181 no changes found
182
183 empty cacert file
184
185 $ touch emptycafile
186 $ hg --config web.cacerts=emptycafile -R copy-pull pull
187 pulling from https://localhost:$HGPORT/
188 abort: error: * (glob)
189 [255]
182 190
183 cacert mismatch 191 cacert mismatch
184 192
185 $ hg -R copy-pull pull --config web.cacerts="$CERTSDIR/pub.pem" \ 193 $ hg -R copy-pull pull --config web.cacerts="$CERTSDIR/pub.pem" \
186 > https://127.0.0.1:$HGPORT/ 194 > https://127.0.0.1:$HGPORT/