1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00
Files
certbot/certbot-compatibility-test/nginx
Erica Portnoy 7be2e79025 Fix nginx parser (#4296)
* rewrite nginx parser to allow everything that nginx does

* also make changes in tls_sni_01.py

* add test case with

* allow embedded variables

* allow empty ${} variable

* fix quotes

* un-special case if

* update all tests to reflect current parsing

* escape in QuotedString after merge

* add test cases for variable weirdness that are almost certainly nginx bugs

* update regex for correct variable rules

* close paren doesn't invoke last_space

* Make test file valid Nginx syntax
2017-03-24 19:45:53 -07:00
..

Eventually there will also be a compatibility test here like the Apache one.

Right now, this is data for the roundtrip test (checking that the parser
can parse each file and that the reserialized config file it generates is
identical to the original).

If run in a virtualenv or otherwise so that certbot_nginx can be imported,
the roundtrip test can run as

python roundtrip.py nginx-roundtrip-testdata

It gives exit status 0 for success and 1 if at least one parse or roundtrip
failure occurred.


The directory nginx-roundtrip-testdata includes some config files that were
contributed to our project as well as most of the configs linked from

https://www.nginx.com/resources/wiki/start/

Some exceptions that were skipped are

https://www.nginx.com/resources/wiki/start/topics/recipes/moinmoin/
https://www.nginx.com/resources/wiki/start/topics/examples/SSL-Offloader/ (not much nginx configuration)
https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/ (likewise)
https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/
https://www.nginx.com/resources/wiki/start/topics/examples/fcgiwrap/