tests: add test for empty CA certs file
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 29 Jun 2016 18:15:28 -0700
changeset 29445 072e4a595607
parent 29444 284d742e5611
child 29446 2f7f1e10f840
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.
tests/test-https.t
--- a/tests/test-https.t	Mon Jun 06 13:08:13 2016 +0200
+++ b/tests/test-https.t	Wed Jun 29 18:15:28 2016 -0700
@@ -180,6 +180,14 @@
   searching for changes
   no changes found
 
+empty cacert file
+
+  $ touch emptycafile
+  $ hg --config web.cacerts=emptycafile -R copy-pull pull
+  pulling from https://localhost:$HGPORT/
+  abort: error: * (glob)
+  [255]
+
 cacert mismatch
 
   $ hg -R copy-pull pull --config web.cacerts="$CERTSDIR/pub.pem" \