2020-09-23 13:36:55 -04:00
|
|
|
# Tox (https://tox.readthedocs.io/) is a tool for running tests in
|
2015-01-28 07:56:12 -05:00
|
|
|
# multiple virtualenvs. To use it, "pip install tox" and then run
|
|
|
|
|
# "tox" from this directory.
|
2014-11-22 09:02:52 -05:00
|
|
|
|
|
|
|
|
[tox]
|
2015-07-10 12:34:08 -04:00
|
|
|
skipsdist = true
|
2020-04-16 11:59:40 -04:00
|
|
|
envlist = modification,py3-cover,lint,mypy
|
2016-01-19 12:22:53 -05:00
|
|
|
|
2017-05-08 14:54:12 -04:00
|
|
|
[base]
|
2017-06-08 15:22:46 -04:00
|
|
|
# pip installs the requested packages in editable mode
|
2018-11-07 20:16:16 -05:00
|
|
|
pip_install = python {toxinidir}/tools/pip_install_editable.py
|
2017-06-08 15:22:46 -04:00
|
|
|
# pip installs the requested packages in editable mode and runs unit tests on
|
|
|
|
|
# them. Each package is installed and tested in the order they are provided
|
2017-12-18 15:31:36 -05:00
|
|
|
# before the script moves on to the next package. All dependencies are pinned
|
|
|
|
|
# to a specific version for increased stability for developers.
|
2018-11-07 20:16:16 -05:00
|
|
|
install_and_test = python {toxinidir}/tools/install_and_test.py
|
2018-07-09 12:16:44 -04:00
|
|
|
dns_packages =
|
|
|
|
|
certbot-dns-cloudflare \
|
2018-01-26 04:47:25 -05:00
|
|
|
certbot-dns-cloudxns \
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-digitalocean \
|
2018-01-26 04:47:25 -05:00
|
|
|
certbot-dns-dnsimple \
|
|
|
|
|
certbot-dns-dnsmadeeasy \
|
2018-07-10 20:36:20 -04:00
|
|
|
certbot-dns-gehirn \
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-google \
|
2018-07-10 16:51:03 -04:00
|
|
|
certbot-dns-linode \
|
2018-01-26 04:47:25 -05:00
|
|
|
certbot-dns-luadns \
|
|
|
|
|
certbot-dns-nsone \
|
2018-07-10 23:52:32 -04:00
|
|
|
certbot-dns-ovh \
|
2017-06-16 19:53:46 -04:00
|
|
|
certbot-dns-rfc2136 \
|
2018-07-10 17:30:37 -04:00
|
|
|
certbot-dns-route53 \
|
|
|
|
|
certbot-dns-sakuracloud
|
2018-07-09 12:16:44 -04:00
|
|
|
all_packages =
|
2018-03-05 12:50:19 -05:00
|
|
|
acme[dev] \
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
certbot[dev] \
|
2018-03-05 12:50:19 -05:00
|
|
|
certbot-apache \
|
2018-07-09 12:16:44 -04:00
|
|
|
{[base]dns_packages} \
|
2020-02-14 20:19:19 -05:00
|
|
|
certbot-nginx
|
2017-06-08 15:22:46 -04:00
|
|
|
install_packages =
|
2018-11-07 20:16:16 -05:00
|
|
|
python {toxinidir}/tools/pip_install_editable.py {[base]all_packages}
|
2017-06-08 15:22:46 -04:00
|
|
|
source_paths =
|
|
|
|
|
acme/acme
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
certbot/certbot
|
2020-12-16 14:34:12 -05:00
|
|
|
certbot-ci/certbot_integration_tests
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-apache/certbot_apache
|
|
|
|
|
certbot-compatibility-test/certbot_compatibility_test
|
|
|
|
|
certbot-dns-cloudflare/certbot_dns_cloudflare
|
|
|
|
|
certbot-dns-cloudxns/certbot_dns_cloudxns
|
|
|
|
|
certbot-dns-digitalocean/certbot_dns_digitalocean
|
|
|
|
|
certbot-dns-dnsimple/certbot_dns_dnsimple
|
2017-06-15 19:41:00 -04:00
|
|
|
certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy
|
2018-07-10 20:36:20 -04:00
|
|
|
certbot-dns-gehirn/certbot_dns_gehirn
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-google/certbot_dns_google
|
2018-07-10 16:51:03 -04:00
|
|
|
certbot-dns-linode/certbot_dns_linode
|
2017-06-16 17:43:12 -04:00
|
|
|
certbot-dns-luadns/certbot_dns_luadns
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-nsone/certbot_dns_nsone
|
2018-07-10 23:52:32 -04:00
|
|
|
certbot-dns-ovh/certbot_dns_ovh
|
2017-06-16 19:53:46 -04:00
|
|
|
certbot-dns-rfc2136/certbot_dns_rfc2136
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-dns-route53/certbot_dns_route53
|
2018-07-10 17:30:37 -04:00
|
|
|
certbot-dns-sakuracloud/certbot_dns_sakuracloud
|
2017-06-08 15:22:46 -04:00
|
|
|
certbot-nginx/certbot_nginx
|
|
|
|
|
tests/lock_test.py
|
2017-05-08 14:54:12 -04:00
|
|
|
|
2017-06-21 16:50:48 -04:00
|
|
|
[testenv]
|
2019-01-17 16:02:35 -05:00
|
|
|
passenv =
|
|
|
|
|
CERTBOT_NO_PIN
|
2020-11-06 05:17:41 -05:00
|
|
|
commands_pre = python {toxinidir}/tools/pipstrap.py
|
2017-05-08 14:54:12 -04:00
|
|
|
commands =
|
2020-04-16 11:59:40 -04:00
|
|
|
!cover: {[base]install_and_test} {[base]all_packages}
|
|
|
|
|
!cover: python tests/lock_test.py
|
|
|
|
|
cover: {[base]install_packages}
|
|
|
|
|
cover: {[base]pip_install} certbot-apache[dev]
|
|
|
|
|
cover: python tox.cover.py
|
2020-02-05 17:37:39 -05:00
|
|
|
# We always recreate the virtual environment to avoid problems like
|
|
|
|
|
# https://github.com/certbot/certbot/issues/7745.
|
|
|
|
|
recreate = true
|
2017-06-21 16:50:48 -04:00
|
|
|
setenv =
|
2019-01-31 15:57:49 -05:00
|
|
|
PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:--numprocesses auto}
|
2017-06-21 16:50:48 -04:00
|
|
|
PYTHONHASHSEED = 0
|
|
|
|
|
|
|
|
|
|
[testenv:py27-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[testenv]commands}
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv]setenv}
|
2017-12-18 15:31:36 -05:00
|
|
|
CERTBOT_OLDEST=1
|
2017-05-19 19:23:53 -04:00
|
|
|
|
2018-03-05 12:50:19 -05:00
|
|
|
[testenv:py27-acme-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]install_and_test} acme[dev]
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv:py27-oldest]setenv}
|
|
|
|
|
|
|
|
|
|
[testenv:py27-apache-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]install_and_test} certbot-apache
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv:py27-oldest]setenv}
|
|
|
|
|
|
2020-01-07 12:57:43 -05:00
|
|
|
[testenv:py27-apache-v2-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]install_and_test} certbot-apache[dev]
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv:py27-oldest]setenv}
|
|
|
|
|
|
2018-03-05 12:50:19 -05:00
|
|
|
[testenv:py27-certbot-oldest]
|
|
|
|
|
commands =
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
{[base]install_and_test} certbot[dev]
|
2018-03-05 12:50:19 -05:00
|
|
|
setenv =
|
|
|
|
|
{[testenv:py27-oldest]setenv}
|
|
|
|
|
|
|
|
|
|
[testenv:py27-dns-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]install_and_test} {[base]dns_packages}
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv:py27-oldest]setenv}
|
|
|
|
|
|
|
|
|
|
[testenv:py27-nginx-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]install_and_test} certbot-nginx
|
|
|
|
|
python tests/lock_test.py
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv:py27-oldest]setenv}
|
2018-07-17 23:00:12 -04:00
|
|
|
|
2014-11-22 09:12:33 -05:00
|
|
|
[testenv:lint]
|
Lint certbot code on Python 3, and update Pylint to the latest version (#7551)
Part of #7550
This PR makes appropriate corrections to run pylint on Python 3.
Why not keeping the dependencies unchanged and just run pylint on Python 3?
Because the old version of pylint breaks horribly on Python 3 because of unsupported version of astroid.
Why updating pylint + astroid to the latest version ?
Because this version only fixes some internal errors occuring during the lint of Certbot code, and is also ready to run gracefully on Python 3.8.
Why upgrading mypy ?
Because the old version does not support the new version of astroid required to run pylint correctly.
Why not upgrading mypy to its latest version ?
Because this latest version includes a new typshed version, that adds a lot of new type definitions, and brings dozens of new errors on the Certbot codebase. I would like to fix that in a future PR.
That said so, the work has been to find the correct set of new dependency versions, then configure pylint for sane configuration errors in our situation, disable irrelevant lintings errors, then fixing (or ignoring for good reason) the remaining mypy errors.
I also made PyLint and MyPy checks run correctly on Windows.
* Start configuration
* Reconfigure travis
* Suspend a check specific to python 3. Start fixing code.
* Repair call_args
* Fix return + elif lints
* Reconfigure development to run mainly on python3
* Remove incompatible Python 3.4 jobs
* Suspend pylint in some assertions
* Remove pylint in dev
* Take first mypy that supports typed-ast>=1.4.0 to limit the migration path
* Various return + else lint errors
* Find a set of deps that is working with current mypy version
* Update local oldest requirements
* Remove all current pylint errors
* Rebuild letsencrypt-auto
* Update mypy to fix pylint with new astroid version, and fix mypy issues
* Explain type: ignore
* Reconfigure tox, fix none path
* Simplify pinning
* Remove useless directive
* Remove debugging code
* Remove continue
* Update requirements
* Disable unsubscriptable-object check
* Disable one check, enabling two more
* Plug certbot dev version for oldest requirements
* Remove useless disable directives
* Remove useless no-member disable
* Remove no-else-* checks. Use elif in symetric branches.
* Add back assertion
* Add new line
* Remove unused pylint disable
* Remove other pylint disable
2019-12-10 17:12:50 -05:00
|
|
|
basepython = python3
|
2015-07-10 09:40:51 -04:00
|
|
|
# separating into multiple invocations disables cross package
|
|
|
|
|
# duplicate code checking; if one of the commands fails, others will
|
|
|
|
|
# continue, but tox return code will reflect previous error
|
2014-11-27 14:13:21 -05:00
|
|
|
commands =
|
2017-06-08 15:22:46 -04:00
|
|
|
{[base]install_packages}
|
Lint certbot code on Python 3, and update Pylint to the latest version (#7551)
Part of #7550
This PR makes appropriate corrections to run pylint on Python 3.
Why not keeping the dependencies unchanged and just run pylint on Python 3?
Because the old version of pylint breaks horribly on Python 3 because of unsupported version of astroid.
Why updating pylint + astroid to the latest version ?
Because this version only fixes some internal errors occuring during the lint of Certbot code, and is also ready to run gracefully on Python 3.8.
Why upgrading mypy ?
Because the old version does not support the new version of astroid required to run pylint correctly.
Why not upgrading mypy to its latest version ?
Because this latest version includes a new typshed version, that adds a lot of new type definitions, and brings dozens of new errors on the Certbot codebase. I would like to fix that in a future PR.
That said so, the work has been to find the correct set of new dependency versions, then configure pylint for sane configuration errors in our situation, disable irrelevant lintings errors, then fixing (or ignoring for good reason) the remaining mypy errors.
I also made PyLint and MyPy checks run correctly on Windows.
* Start configuration
* Reconfigure travis
* Suspend a check specific to python 3. Start fixing code.
* Repair call_args
* Fix return + elif lints
* Reconfigure development to run mainly on python3
* Remove incompatible Python 3.4 jobs
* Suspend pylint in some assertions
* Remove pylint in dev
* Take first mypy that supports typed-ast>=1.4.0 to limit the migration path
* Various return + else lint errors
* Find a set of deps that is working with current mypy version
* Update local oldest requirements
* Remove all current pylint errors
* Rebuild letsencrypt-auto
* Update mypy to fix pylint with new astroid version, and fix mypy issues
* Explain type: ignore
* Reconfigure tox, fix none path
* Simplify pinning
* Remove useless directive
* Remove debugging code
* Remove continue
* Update requirements
* Disable unsubscriptable-object check
* Disable one check, enabling two more
* Plug certbot dev version for oldest requirements
* Remove useless disable directives
* Remove useless no-member disable
* Remove no-else-* checks. Use elif in symetric branches.
* Add back assertion
* Add new line
* Remove unused pylint disable
* Remove other pylint disable
2019-12-10 17:12:50 -05:00
|
|
|
{[base]pip_install} certbot[dev3]
|
2018-11-07 20:16:16 -05:00
|
|
|
python -m pylint --reports=n --rcfile=.pylintrc {[base]source_paths}
|
2015-12-16 22:52:35 -05:00
|
|
|
|
2017-03-18 22:10:10 -04:00
|
|
|
[testenv:mypy]
|
2018-04-12 18:47:39 -04:00
|
|
|
basepython = python3
|
2017-03-18 22:10:10 -04:00
|
|
|
commands =
|
2017-06-08 15:22:46 -04:00
|
|
|
{[base]install_packages}
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
{[base]pip_install} certbot[dev3]
|
2018-04-12 21:53:07 -04:00
|
|
|
mypy {[base]source_paths}
|
2017-03-18 22:10:10 -04:00
|
|
|
|
2015-12-22 18:50:48 -05:00
|
|
|
[testenv:apacheconftest]
|
2015-12-16 22:52:35 -05:00
|
|
|
commands =
|
2020-04-09 16:15:28 -04:00
|
|
|
{[base]pip_install} acme certbot certbot-apache
|
2019-11-27 12:57:35 -05:00
|
|
|
{toxinidir}/certbot-apache/tests/apache-conf-files/apache-conf-test --debian-modules
|
2019-01-09 15:37:45 -05:00
|
|
|
passenv =
|
|
|
|
|
SERVER
|
|
|
|
|
|
2020-04-09 16:15:28 -04:00
|
|
|
[testenv:apacheconftest-external-with-pebble]
|
|
|
|
|
# Run apacheconftest with pebble and Certbot outside of tox's virtual
|
|
|
|
|
# environment.
|
2019-01-09 15:37:45 -05:00
|
|
|
commands =
|
2020-04-09 16:15:28 -04:00
|
|
|
{[base]pip_install} certbot-ci
|
2019-11-27 12:57:35 -05:00
|
|
|
{toxinidir}/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py --debian-modules
|
2016-04-10 14:44:28 -04:00
|
|
|
|
2020-04-09 16:15:28 -04:00
|
|
|
[testenv:apacheconftest-with-pebble]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]pip_install} acme certbot certbot-apache
|
|
|
|
|
{[testenv:apacheconftest-external-with-pebble]commands}
|
|
|
|
|
|
2016-08-10 19:43:15 -04:00
|
|
|
[testenv:nginxroundtrip]
|
|
|
|
|
commands =
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
{[base]pip_install} acme certbot certbot-apache certbot-nginx
|
2016-08-10 19:43:15 -04:00
|
|
|
python certbot-compatibility-test/nginx/roundtrip.py certbot-compatibility-test/nginx/nginx-roundtrip-testdata
|
2016-01-08 16:55:52 -05:00
|
|
|
|
2016-10-28 18:05:25 -04:00
|
|
|
# This is a duplication of the command line in testenv:le_auto to
|
|
|
|
|
# allow users to run the modification check by running `tox`
|
|
|
|
|
[testenv:modification]
|
|
|
|
|
commands =
|
2018-11-07 20:16:16 -05:00
|
|
|
python {toxinidir}/tests/modification-check.py
|
2020-07-02 18:01:21 -04:00
|
|
|
passenv = TARGET_BRANCH
|
2016-10-28 18:05:25 -04:00
|
|
|
|
2016-08-10 19:33:56 -04:00
|
|
|
[testenv:apache_compat]
|
|
|
|
|
commands =
|
|
|
|
|
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
|
|
|
|
docker build -t apache-compat -f certbot-compatibility-test/Dockerfile-apache .
|
2020-07-02 18:01:21 -04:00
|
|
|
docker run --rm -t apache-compat -c apache.tar.gz -vvvv
|
2016-08-10 19:33:56 -04:00
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
2018-07-31 13:31:36 -04:00
|
|
|
passenv =
|
|
|
|
|
DOCKER_*
|
2016-08-10 19:33:56 -04:00
|
|
|
|
|
|
|
|
[testenv:nginx_compat]
|
|
|
|
|
commands =
|
|
|
|
|
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
|
|
|
|
docker build -t nginx-compat -f certbot-compatibility-test/Dockerfile-nginx .
|
2020-07-02 18:01:21 -04:00
|
|
|
docker run --rm -t nginx-compat -c nginx.tar.gz -vv -aie
|
2016-08-10 19:33:56 -04:00
|
|
|
whitelist_externals =
|
|
|
|
|
docker
|
2018-07-31 13:31:36 -04:00
|
|
|
passenv =
|
|
|
|
|
DOCKER_*
|
2016-11-10 16:15:17 -05:00
|
|
|
|
2017-05-25 19:27:31 -04:00
|
|
|
[testenv:docker_dev]
|
|
|
|
|
# tests the Dockerfile-dev file to ensure development with it works
|
|
|
|
|
# as expected
|
|
|
|
|
commands =
|
|
|
|
|
docker-compose run --rm --service-ports development bash -c 'tox -e lint'
|
|
|
|
|
whitelist_externals =
|
2018-11-30 17:44:47 -05:00
|
|
|
docker-compose
|
2017-05-25 19:27:31 -04:00
|
|
|
passenv = DOCKER_*
|
2019-03-01 16:18:06 -05:00
|
|
|
|
|
|
|
|
[testenv:integration]
|
|
|
|
|
commands =
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
{[base]pip_install} acme certbot certbot-nginx certbot-ci
|
2019-05-14 16:56:32 -04:00
|
|
|
pytest certbot-ci/certbot_integration_tests \
|
2019-03-01 16:18:06 -05:00
|
|
|
--acme-server={env:ACME_SERVER:pebble} \
|
|
|
|
|
--cov=acme --cov=certbot --cov=certbot_nginx --cov-report= \
|
2019-05-14 16:56:32 -04:00
|
|
|
--cov-config=certbot-ci/certbot_integration_tests/.coveragerc
|
2019-09-06 17:30:25 -04:00
|
|
|
coverage report --include 'certbot/*' --show-missing --fail-under=65
|
[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
2019-04-23 16:29:48 -04:00
|
|
|
coverage report --include 'certbot-nginx/*' --show-missing --fail-under=74
|
2019-05-14 16:56:32 -04:00
|
|
|
passenv = DOCKER_*
|
|
|
|
|
|
2019-08-06 18:02:16 -04:00
|
|
|
[testenv:integration-certbot]
|
|
|
|
|
commands =
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
{[base]pip_install} acme certbot certbot-ci
|
2019-08-06 18:02:16 -04:00
|
|
|
pytest certbot-ci/certbot_integration_tests/certbot_tests \
|
|
|
|
|
--acme-server={env:ACME_SERVER:pebble} \
|
|
|
|
|
--cov=acme --cov=certbot --cov-report= \
|
|
|
|
|
--cov-config=certbot-ci/certbot_integration_tests/.coveragerc
|
|
|
|
|
coverage report --include 'certbot/*' --show-missing --fail-under=62
|
|
|
|
|
|
2020-11-17 03:27:27 -05:00
|
|
|
[testenv:integration-dns-rfc2136]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]pip_install} acme certbot certbot-dns-rfc2136 certbot-ci
|
|
|
|
|
pytest certbot-ci/certbot_integration_tests/rfc2136_tests \
|
|
|
|
|
--acme-server=pebble --dns-server=bind \
|
2020-12-06 03:23:33 -05:00
|
|
|
--numprocesses=1 \
|
|
|
|
|
--cov=acme --cov=certbot --cov=certbot_dns_rfc2136 --cov-report= \
|
|
|
|
|
--cov-config=certbot-ci/certbot_integration_tests/.coveragerc
|
|
|
|
|
coverage report --include 'certbot/*' --show-missing --fail-under=45
|
|
|
|
|
coverage report --include 'certbot-dns-rfc2136/*' --show-missing --fail-under=87
|
2020-11-17 03:27:27 -05:00
|
|
|
|
2020-04-09 16:15:28 -04:00
|
|
|
[testenv:integration-external]
|
|
|
|
|
# Run integration tests with Certbot outside of tox's virtual environment.
|
|
|
|
|
commands =
|
|
|
|
|
{[base]pip_install} certbot-ci
|
|
|
|
|
pytest certbot-ci/certbot_integration_tests \
|
|
|
|
|
--acme-server={env:ACME_SERVER:pebble}
|
|
|
|
|
passenv = DOCKER_*
|
|
|
|
|
|
2019-05-14 16:56:32 -04:00
|
|
|
[testenv:integration-certbot-oldest]
|
|
|
|
|
commands =
|
Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544)
Summary of changes in this PR:
- Refactor files involved in the `certbot` module to be of a similar structure to every other package; that is, inside a directory inside the main repo root (see below).
- Make repo root README symlink to `certbot` README.
- Pull tests outside of the distributed module.
- Make `certbot/tests` not be a module so that `certbot` isn't added to Python's path for module discovery.
- Remove `--pyargs` from test calls, and make sure to call tests from repo root since without `--pyargs`, `pytest` takes directory names rather than package names as arguments.
- Replace mentions of `.` with `certbot` when referring to packages to install, usually editably.
- Clean up some unused code around executing tests in a different directory.
- Create public shim around main and make that the entry point.
New directory structure summary:
```
repo root ("certbot", probably, but for clarity all files I mention are relative to here)
├── certbot
│ ├── setup.py
│ ├── certbot
│ │ ├── __init__.py
│ │ ├── achallenges.py
│ │ ├── _internal
│ │ │ ├── __init__.py
│ │ │ ├── account.py
│ │ │ ├── ...
│ │ ├── ...
│ ├── tests
│ │ ├── account_test.py
│ │ ├── display
│ │ │ ├── __init__.py
│ │ │ ├── ...
│ │ ├── ... # note no __init__.py at this level
│ ├── ...
├── acme
│ ├── ...
├── certbot-apache
│ ├── ...
├── ...
```
* refactor certbot/ and certbot/tests/ to use the same structure as the other packages
* git grep -lE "\-e(\s+)\." | xargs sed -i -E "s/\-e(\s+)\./-e certbot/g"
* git grep -lE "\.\[dev\]" | xargs sed -i -E "s/\.\[dev\]/certbot[dev]/g"
* git grep -lE "\.\[dev3\]" | xargs sed -i -E "s/\.\[dev3\]/certbot[dev3]/g"
* Remove replacement of certbot into . in install_and_test.py
* copy license back out to main folder
* remove linter_plugin.py and CONTRIBUTING.md from certbot/MANIFEST.in because these files are not under certbot/
* Move README back into main folder, and make the version inside certbot/ a symlink
* symlink certbot READMEs the other way around
* move testdata into the public api certbot zone
* update source_paths in tox.ini to certbot/certbot to find the right subfolder for tests
* certbot version has been bumped down a directory level
* make certbot tests directory not a package and import sibling as module
* Remove unused script cruft
* change . to certbot in test_sdists
* remove outdated comment referencing a command that doesn't work
* Install instructions should reference an existing file
* update file paths in Dockerfile
* some package named in tox.ini were manually specified, change those to certbot
* new directory format doesn't work easily with pyargs according to http://doc.pytest.org/en/latest/goodpractices.html#tests-as-part-of-application-code
* remove other instance of pyargs
* fix up some references in _release.sh by searching for ' . ' and manual check
* another stray . in tox.ini
* fix paths in tools/_release.sh
* Remove final --pyargs call, and now-unnecessary call to modules instead of local files, since that's fixed by certbot's code being one layer deeper
* Create public shim around main and make that the entry point
* without pyargs, tests cannot be run from an empty directory
* Remove cruft for running certbot directly from main
* Have main shim take real arg
* add docs/api file for main, and fix up main comment
* Update certbot/docs/install.rst
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
* Fix comments in readthedocs requirements files to refer to current package
* Update .[docs] reference in contributing.rst
* Move plugins tests to certbot tests directory
* add certbot tests to MANIFEST.in so packagers can run python setup.py test
* move examples directory inside certbot/
* Move CHANGELOG into certbot, and create a top-level symlink
* Remove unused sys and logging from main shim
* nginx http01 test no longer relies on certbot plugins common test
2019-11-25 17:28:06 -05:00
|
|
|
{[base]pip_install} certbot
|
2019-05-14 16:56:32 -04:00
|
|
|
{[base]pip_install} certbot-ci
|
|
|
|
|
pytest certbot-ci/certbot_integration_tests/certbot_tests \
|
|
|
|
|
--acme-server={env:ACME_SERVER:pebble}
|
|
|
|
|
passenv = DOCKER_*
|
|
|
|
|
setenv = {[testenv:py27-oldest]setenv}
|
|
|
|
|
|
|
|
|
|
[testenv:integration-nginx-oldest]
|
|
|
|
|
commands =
|
|
|
|
|
{[base]pip_install} certbot-nginx
|
|
|
|
|
{[base]pip_install} certbot-ci
|
|
|
|
|
pytest certbot-ci/certbot_integration_tests/nginx_tests \
|
|
|
|
|
--acme-server={env:ACME_SERVER:pebble}
|
|
|
|
|
passenv = DOCKER_*
|
|
|
|
|
setenv = {[testenv:py27-oldest]setenv}
|
2019-05-17 19:30:20 -04:00
|
|
|
|
2020-07-02 18:01:21 -04:00
|
|
|
[testenv:test-farm-tests-base]
|
2019-05-17 19:30:20 -04:00
|
|
|
changedir = tests/letstest
|
|
|
|
|
deps = -rtests/letstest/requirements.txt
|
|
|
|
|
passenv =
|
|
|
|
|
AWS_*
|
|
|
|
|
setenv = AWS_DEFAULT_REGION=us-east-1
|
|
|
|
|
|
2020-07-02 18:01:21 -04:00
|
|
|
[testenv:test-farm-apache2]
|
|
|
|
|
changedir = {[testenv:test-farm-tests-base]changedir}
|
2020-09-30 20:05:52 -04:00
|
|
|
commands = {toxinidir}/tools/retry.sh python multitester.py apache2_targets.yaml {env:AWS_EC2_PEM_FILE} SET_BY_ENV scripts/test_apache2.sh --repo {toxinidir}
|
2020-07-02 18:01:21 -04:00
|
|
|
deps = {[testenv:test-farm-tests-base]deps}
|
|
|
|
|
passenv = {[testenv:test-farm-tests-base]passenv}
|
|
|
|
|
setenv = {[testenv:test-farm-tests-base]setenv}
|
|
|
|
|
|
|
|
|
|
[testenv:test-farm-leauto-upgrades]
|
|
|
|
|
changedir = {[testenv:test-farm-tests-base]changedir}
|
2020-09-30 20:05:52 -04:00
|
|
|
commands = {toxinidir}/tools/retry.sh python multitester.py auto_targets.yaml {env:AWS_EC2_PEM_FILE} SET_BY_ENV scripts/test_leauto_upgrades.sh --repo {toxinidir}
|
2020-07-02 18:01:21 -04:00
|
|
|
deps = {[testenv:test-farm-tests-base]deps}
|
|
|
|
|
passenv = {[testenv:test-farm-tests-base]passenv}
|
|
|
|
|
setenv = {[testenv:test-farm-tests-base]setenv}
|
|
|
|
|
|
|
|
|
|
[testenv:test-farm-certonly-standalone]
|
|
|
|
|
changedir = {[testenv:test-farm-tests-base]changedir}
|
2020-09-30 20:05:52 -04:00
|
|
|
commands = {toxinidir}/tools/retry.sh python multitester.py auto_targets.yaml {env:AWS_EC2_PEM_FILE} SET_BY_ENV scripts/test_letsencrypt_auto_certonly_standalone.sh --repo {toxinidir}
|
2020-07-02 18:01:21 -04:00
|
|
|
deps = {[testenv:test-farm-tests-base]deps}
|
|
|
|
|
passenv = {[testenv:test-farm-tests-base]passenv}
|
|
|
|
|
setenv = {[testenv:test-farm-tests-base]setenv}
|
|
|
|
|
|
|
|
|
|
[testenv:test-farm-sdists]
|
|
|
|
|
changedir = {[testenv:test-farm-tests-base]changedir}
|
2020-09-30 20:05:52 -04:00
|
|
|
commands = {toxinidir}/tools/retry.sh python multitester.py targets.yaml {env:AWS_EC2_PEM_FILE} SET_BY_ENV scripts/test_sdists.sh --repo {toxinidir}
|
2020-07-02 18:01:21 -04:00
|
|
|
deps = {[testenv:test-farm-tests-base]deps}
|
|
|
|
|
passenv = {[testenv:test-farm-tests-base]passenv}
|
|
|
|
|
setenv = {[testenv:test-farm-tests-base]setenv}
|