diff options
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 158 |
1 files changed, 113 insertions, 45 deletions
@@ -31,17 +31,16 @@ dns_packages = certbot-dns-sakuracloud all_packages = acme[dev] \ - .[dev] \ + certbot[dev] \ certbot-apache \ {[base]dns_packages} \ certbot-nginx \ - certbot-postfix \ letshelp-certbot install_packages = python {toxinidir}/tools/pip_install_editable.py {[base]all_packages} source_paths = acme/acme - certbot + certbot/certbot certbot-apache/certbot_apache certbot-compatibility-test/certbot_compatibility_test certbot-dns-cloudflare/certbot_dns_cloudflare @@ -59,7 +58,6 @@ source_paths = certbot-dns-route53/certbot_dns_route53 certbot-dns-sakuracloud/certbot_dns_sakuracloud certbot-nginx/certbot_nginx - certbot-postfix/certbot_postfix letshelp-certbot/letshelp_certbot tests/lock_test.py @@ -69,6 +67,9 @@ passenv = commands = {[base]install_and_test} {[base]all_packages} python tests/lock_test.py +# We always recreate the virtual environment to avoid problems like +# https://github.com/certbot/certbot/issues/7745. +recreate = true setenv = PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:--numprocesses auto} PYTHONHASHSEED = 0 @@ -94,7 +95,7 @@ setenv = [testenv:py27-certbot-oldest] commands = - {[base]install_and_test} .[dev] + {[base]install_and_test} certbot[dev] setenv = {[testenv:py27-oldest]setenv} @@ -111,17 +112,6 @@ commands = setenv = {[testenv:py27-oldest]setenv} -[testenv:py27-postfix-oldest] -commands = - {[base]install_and_test} certbot-postfix -setenv = - {[testenv:py27-oldest]setenv} - -[testenv:py27_install] -basepython = python2.7 -commands = - {[base]install_packages} - [testenv:py27-cover] basepython = python2.7 commands = @@ -135,44 +125,37 @@ commands = python tox.cover.py [testenv:lint] -basepython = python2.7 +basepython = python3 # 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 commands = {[base]install_packages} + {[base]pip_install} certbot[dev3] python -m pylint --reports=n --rcfile=.pylintrc {[base]source_paths} [testenv:mypy] basepython = python3 commands = {[base]install_packages} - {[base]pip_install} .[dev3] + {[base]pip_install} certbot[dev3] mypy {[base]source_paths} [testenv:apacheconftest] -#basepython = python2.7 commands = - {[base]pip_install} acme . certbot-apache certbot-compatibility-test - {toxinidir}/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test --debian-modules + {[base]pip_install} acme certbot certbot-apache certbot-compatibility-test + {toxinidir}/certbot-apache/tests/apache-conf-files/apache-conf-test --debian-modules passenv = SERVER [testenv:apacheconftest-with-pebble] commands = - {toxinidir}/tests/pebble-fetch.sh - {[testenv:apacheconftest]commands} -passenv = - HOME - GOPATH - PEBBLEPATH - PEBBLE_STRICT -setenv = - SERVER=https://localhost:14000/dir + {[base]pip_install} acme certbot certbot-apache certbot-ci certbot-compatibility-test + {toxinidir}/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py --debian-modules [testenv:nginxroundtrip] commands = - {[base]pip_install} acme . certbot-apache certbot-nginx + {[base]pip_install} acme certbot certbot-apache certbot-nginx python certbot-compatibility-test/nginx/roundtrip.py certbot-compatibility-test/nginx/nginx-roundtrip-testdata # This is a duplication of the command line in testenv:le_auto to @@ -201,12 +184,11 @@ whitelist_externals = passenv = DOCKER_* -[testenv:le_auto_trusty] -# At the moment, this tests under Python 2.7 only, as only that version is -# readily available on the Trusty Docker image. +[testenv:le_auto_xenial] +# At the moment, this tests under Python 2.7 only. commands = python {toxinidir}/tests/modification-check.py - docker build -f letsencrypt-auto-source/Dockerfile.trusty -t lea letsencrypt-auto-source + docker build -f letsencrypt-auto-source/Dockerfile.xenial -t lea letsencrypt-auto-source docker run --rm -t -i lea whitelist_externals = docker @@ -214,15 +196,6 @@ passenv = DOCKER_* TRAVIS_BRANCH -[testenv:le_auto_xenial] -# At the moment, this tests under Python 2.7 only. -commands = - docker build -f letsencrypt-auto-source/Dockerfile.xenial -t lea letsencrypt-auto-source - docker run --rm -t -i lea -whitelist_externals = - docker -passenv = DOCKER_* - [testenv:le_auto_jessie] # At the moment, this tests under Python 2.7 only, as only that version is # readily available on the Wheezy Docker image. @@ -237,7 +210,17 @@ passenv = DOCKER_* # At the moment, this tests under Python 2.6 only, as only that version is # readily available on the CentOS 6 Docker image. commands = - docker build -f letsencrypt-auto-source/Dockerfile.centos6 -t lea letsencrypt-auto-source + docker build -f letsencrypt-auto-source/Dockerfile.redhat6 --build-arg REDHAT_DIST_FLAVOR=centos -t lea letsencrypt-auto-source + docker run --rm -t -i lea +whitelist_externals = + docker +passenv = DOCKER_* + +[testenv:le_auto_oraclelinux6] +# At the moment, this tests under Python 2.6 only, as only that version is +# readily available on the Oracle Linux 6 Docker image. +commands = + docker build -f letsencrypt-auto-source/Dockerfile.redhat6 --build-arg REDHAT_DIST_FLAVOR=oraclelinux -t lea letsencrypt-auto-source docker run --rm -t -i lea whitelist_externals = docker @@ -251,3 +234,88 @@ commands = whitelist_externals = docker-compose passenv = DOCKER_* + +[testenv:integration] +commands = + {[base]pip_install} acme certbot certbot-nginx certbot-ci + pytest certbot-ci/certbot_integration_tests \ + --acme-server={env:ACME_SERVER:pebble} \ + --cov=acme --cov=certbot --cov=certbot_nginx --cov-report= \ + --cov-config=certbot-ci/certbot_integration_tests/.coveragerc + coverage report --include 'certbot/*' --show-missing --fail-under=65 + coverage report --include 'certbot-nginx/*' --show-missing --fail-under=74 +passenv = DOCKER_* + +[testenv:integration-certbot] +commands = + {[base]pip_install} acme certbot certbot-ci + 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 + +[testenv:integration-certbot-oldest] +commands = + {[base]pip_install} certbot + {[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} + +[testenv:travis-test-farm-tests-base] +changedir = tests/letstest +commands = + ./travis-setup.sh +deps = -rtests/letstest/requirements.txt +passenv = + AWS_* + TRAVIS_* + encrypted_* +setenv = AWS_DEFAULT_REGION=us-east-1 + +[testenv:travis-test-farm-apache2] +changedir = {[testenv:travis-test-farm-tests-base]changedir} +commands = + {[testenv:travis-test-farm-tests-base]commands} + python multitester.py apache2_targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_apache2.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} +deps = {[testenv:travis-test-farm-tests-base]deps} +passenv = {[testenv:travis-test-farm-tests-base]passenv} +setenv = {[testenv:travis-test-farm-tests-base]setenv} + +[testenv:travis-test-farm-leauto-upgrades] +changedir = {[testenv:travis-test-farm-tests-base]changedir} +commands = + {[testenv:travis-test-farm-tests-base]commands} + python multitester.py targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_leauto_upgrades.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} +deps = {[testenv:travis-test-farm-tests-base]deps} +passenv = {[testenv:travis-test-farm-tests-base]passenv} +setenv = {[testenv:travis-test-farm-tests-base]setenv} + +[testenv:travis-test-farm-certonly-standalone] +changedir = {[testenv:travis-test-farm-tests-base]changedir} +commands = + {[testenv:travis-test-farm-tests-base]commands} + python multitester.py targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_letsencrypt_auto_certonly_standalone.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} +deps = {[testenv:travis-test-farm-tests-base]deps} +passenv = {[testenv:travis-test-farm-tests-base]passenv} +setenv = {[testenv:travis-test-farm-tests-base]setenv} + +[testenv:travis-test-farm-sdists] +changedir = {[testenv:travis-test-farm-tests-base]changedir} +commands = + {[testenv:travis-test-farm-tests-base]commands} + python multitester.py targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_sdists.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} +deps = {[testenv:travis-test-farm-tests-base]deps} +passenv = {[testenv:travis-test-farm-tests-base]passenv} +setenv = {[testenv:travis-test-farm-tests-base]setenv} |