##// END OF EJS Templates
sslutil: inform the user about how to fix an incomplete certificate chain...
sslutil: inform the user about how to fix an incomplete certificate chain This is a Windows only thing. Unfortunately, the socket is closed at this point (so the certificate is unavailable to check the chain). That means it's printed out when verification fails as a guess, on the assumption that 1) most of the time verification won't fail, and 2) sites using expired or certs that are too new will be rare. Maybe this is an argument for adding more functionality to debugssl, to test for problems and print certificate info. Or maybe it's an argument for bundling certificates with the Windows builds. That idea was set aside when the enhanced SSL code went in last summer, and it looks like there were issues with using certifi on Windows anyway[1]. This was tested by deleting the certificate out of certmgr.msc > "Third-Party Root Certification Authorities" > "Certificates", seeing `hg pull` fail (with the new message), trying this command, and then successfully performing the pull command. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-October/089573.html

File last commit:

r33199:ddd65b4f default
r33494:30f2715b default
Show More
test-check-config.t
47 lines | 1.5 KiB | text/troff | Tads3Lexer
/ tests / test-check-config.t
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 #require test-repo
timeless
tests: silence test-repo obsolete warning...
r29219 $ . "$TESTDIR/helpers-testrepo.sh"
Gregory Szorc
tests: add test coverage for check-config...
r32846
Sanity check check-config.py
$ cat > testfile.py << EOF
> # Good
> foo = ui.config('ui', 'username')
> # Missing
> foo = ui.config('ui', 'doesnotexist')
> # Missing different type
> foo = ui.configint('ui', 'missingint')
> # Missing with default value
> foo = ui.configbool('ui', 'missingbool1', default=True)
> foo = ui.configbool('ui', 'missingbool2', False)
Gregory Szorc
check-config: syntax to allow inconsistent config values...
r33192 > # Inconsistent values for defaults.
> foo = ui.configint('ui', 'intdefault', default=1)
> foo = ui.configint('ui', 'intdefault', default=42)
> # Can suppress inconsistent value error
> foo = ui.configint('ui', 'intdefault2', default=1)
> # inconsistent config: ui.intdefault2
> foo = ui.configint('ui', 'intdefault2', default=42)
Gregory Szorc
tests: add test coverage for check-config...
r32846 > EOF
$ cat > files << EOF
> mercurial/help/config.txt
> $TESTTMP/testfile.py
> EOF
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 $ cd "$TESTDIR"/..
Augie Fackler
cleanup: use $PYTHON to run python in many more tests...
r32940 $ $PYTHON contrib/check-config.py < $TESTTMP/files
Gregory Szorc
check-config: syntax to allow inconsistent config values...
r33192 foo = ui.configint('ui', 'intdefault', default=42)
conflict on ui.intdefault: ('int', '42') != ('int', '1')
Gregory Szorc
tests: add test coverage for check-config...
r32846 undocumented: ui.doesnotexist (str)
Gregory Szorc
check-config: syntax to allow inconsistent config values...
r33192 undocumented: ui.intdefault (int) [42]
undocumented: ui.intdefault2 (int) [42]
Gregory Szorc
tests: add test coverage for check-config...
r32846 undocumented: ui.missingbool1 (bool) [True]
undocumented: ui.missingbool2 (bool)
undocumented: ui.missingint (int)
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 New errors are not allowed. Warnings are strongly discouraged.
Yuya Nishihara
tests: alias syshg and syshgenv so they can be switched conditionally
r33199 $ testrepohg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
Augie Fackler
cleanup: use $PYTHON to run python in many more tests...
r32940 > $PYTHON contrib/check-config.py