diff options
author | Adrien Ferrand <adferrand@users.noreply.github.com> | 2019-04-23 23:29:48 +0300 |
---|---|---|
committer | Brad Warren <bmw@users.noreply.github.com> | 2019-04-23 23:29:48 +0300 |
commit | 618e0562a071151452198d60b9cfd7c0c9a41f5e (patch) | |
tree | ce3a184e9cdb1d494edc69082c9a01456c707e14 /tox.ini | |
parent | 2812f054a3e9bf87a799c9d153393a9d3593fed0 (diff) |
[Unix] Create a framework for certbot integration tests: PART 4 (#6958)
This PR is the part 4 to implement #6541. It adds the integration tests for the nginx certbot plugin, and corresponds to the certbot-ci translation of certbot-nginx/tests/boulder-integration.sh that is executed for each PR.
As with certbot core tests, tests are written in Python, and executed by pytest, against a dynamic Boulder/Pebble instance setup. Tests are parallelized, of course, and a specific IntegrationTestsContext class, extended the one from certbot core tests, is crafter for these specific tests: its main goal is to setup a specific nginx instance for the current test.
On top of that, I use the test parametrization feature of Pytest, to drastically reduce the size of the actual code: indeed, the 6 tests from the original bash script share the same logic. So using a parametrization, one unique test is written, that is then executed 6 times against 6 different sets of parameters.
Note that the module integration_tests.nginx_tests.nginx_config do the same, but in Python, than certbot-nginx/tests/boulder-integration.conf.sh. The latter will be removed in a future PR, with all other bash scripts.
* Add nginx tests
* Distribute the other_port
* Load a pre-generated key/cert for nginx config
* Correct preload, remove a test, simplify a variable
* Integrate assertion directly in the test function
* Check process is not terminated
* Add spaces in the nginx config
* Add comments
* Use indirection
* Allow external cert
* Add coverage threshold for certbot-nginx
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -260,5 +260,6 @@ commands = --cov-config={toxinidir}/certbot-ci/certbot_integration_tests/.coveragerc \ -W 'ignore:Unverified HTTPS request' coverage report --include 'certbot/*' --show-missing --fail-under=64 + coverage report --include 'certbot-nginx/*' --show-missing --fail-under=74 passenv = DOCKER_* |