diff --git a/.azure-pipelines/templates/jobs/extended-tests-jobs.yml b/.azure-pipelines/templates/jobs/extended-tests-jobs.yml index 45873b835..d7c1a8e55 100644 --- a/.azure-pipelines/templates/jobs/extended-tests-jobs.yml +++ b/.azure-pipelines/templates/jobs/extended-tests-jobs.yml @@ -17,10 +17,6 @@ jobs: linux-py310: PYTHON_VERSION: 3.10 TOXENV: py310 - linux-py37-nopin: - PYTHON_VERSION: 3.7 - TOXENV: py37 - CERTBOT_NO_PIN: 1 linux-boulder-v2-integration-certbot-oldest: PYTHON_VERSION: 3.7 TOXENV: integration-certbot-oldest diff --git a/.azure-pipelines/templates/jobs/packaging-jobs.yml b/.azure-pipelines/templates/jobs/packaging-jobs.yml index a70087c42..22f0f3790 100644 --- a/.azure-pipelines/templates/jobs/packaging-jobs.yml +++ b/.azure-pipelines/templates/jobs/packaging-jobs.yml @@ -66,7 +66,6 @@ jobs: addToPath: true - script: | python -m venv venv - venv\Scripts\python tools\pipstrap.py venv\Scripts\python tools\pip_install.py -e windows-installer displayName: Prepare Windows installer build environment - script: | @@ -103,7 +102,6 @@ jobs: displayName: Retrieve Windows installer - script: | python -m venv venv - venv\Scripts\python tools\pipstrap.py venv\Scripts\python tools\pip_install.py -e certbot-ci env: PIP_NO_BUILD_ISOLATION: no @@ -175,7 +173,6 @@ jobs: sudo apt-get update sudo apt-get install -y --no-install-recommends nginx-light snapd python3 -m venv venv - venv/bin/python tools/pipstrap.py venv/bin/python tools/pip_install.py -U tox displayName: Install dependencies - task: DownloadPipelineArtifact@2 @@ -213,7 +210,6 @@ jobs: - script: | set -e python3 -m venv venv - venv/bin/python tools/pipstrap.py venv/bin/python tools/pip_install.py -e certbot-ci displayName: Prepare Certbot-CI - script: | diff --git a/.azure-pipelines/templates/steps/tox-steps.yml b/.azure-pipelines/templates/steps/tox-steps.yml index 5557bac68..a993677b1 100644 --- a/.azure-pipelines/templates/steps/tox-steps.yml +++ b/.azure-pipelines/templates/steps/tox-steps.yml @@ -28,17 +28,9 @@ steps: inputs: versionSpec: $(PYTHON_VERSION) addToPath: true - # tools/pip_install.py is used to pin packages to a known working version - # except in tests where the environment variable CERTBOT_NO_PIN is set. - # virtualenv is listed here explicitly to make sure it is upgraded when - # CERTBOT_NO_PIN is set to work around failures we've seen when using an older - # version of virtualenv. The option "-I" is set so when CERTBOT_NO_PIN is also - # set, pip updates dependencies it thinks are already satisfied to avoid some - # problems with its lack of real dependency resolution. - bash: | set -e - python3 tools/pipstrap.py - python3 tools/pip_install.py -I tox virtualenv + python3 tools/pip_install.py tox displayName: Install runtime dependencies - task: DownloadSecureFile@1 name: testFarmPem diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 327930d70..4735944f1 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,8 +1,8 @@ name: Update Stale Issues on: schedule: - # Run at midnight every night - - cron: '24 1 * * *' + # Run 24 minutes past the hour 4 times a day. + - cron: '24 */6 * * *' permissions: issues: write jobs: diff --git a/.pylintrc b/.pylintrc index 194a8fe94..05f34fb1f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -48,7 +48,10 @@ ignore=CVS # ignore-list. The regex matches against paths and can be in Posix or Windows # format. Because '\' represents the directory delimiter on Windows systems, it # can't be used as an escape character. -ignore-paths= +# CERTBOT COMMENT +# Changing this line back to the default of `ignore-paths=` is being tracked by +# https://github.com/certbot/certbot/issues/7908. +ignore-paths=.*/_internal/tests/ # Files or directories matching the regular expression patterns are skipped. # The regex matches against base names, not paths. The default value ignores diff --git a/acme/MANIFEST.in b/acme/MANIFEST.in index 089f33a0d..b3badd473 100644 --- a/acme/MANIFEST.in +++ b/acme/MANIFEST.in @@ -3,7 +3,7 @@ include README.rst include pytest.ini recursive-include docs * recursive-include examples * -recursive-include tests * +recursive-include acme/_internal/tests/testdata * include acme/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/acme/acme/_internal/__init__.py b/acme/acme/_internal/__init__.py new file mode 100644 index 000000000..bc855fd7b --- /dev/null +++ b/acme/acme/_internal/__init__.py @@ -0,0 +1 @@ +"""acme's internal implementation""" diff --git a/acme/acme/_internal/tests/__init__.py b/acme/acme/_internal/tests/__init__.py new file mode 100644 index 000000000..9e17591c4 --- /dev/null +++ b/acme/acme/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""acme tests""" diff --git a/acme/tests/challenges_test.py b/acme/acme/_internal/tests/challenges_test.py similarity index 99% rename from acme/tests/challenges_test.py rename to acme/acme/_internal/tests/challenges_test.py index 1febaff54..98461dc51 100644 --- a/acme/tests/challenges_test.py +++ b/acme/acme/_internal/tests/challenges_test.py @@ -11,7 +11,7 @@ import pytest import requests from acme import errors -import test_util +from acme._internal.tests import test_util CERT = test_util.load_comparable_cert('cert.pem') KEY = jose.JWKRSA(key=test_util.load_rsa_private_key('rsa512_key.pem')) diff --git a/acme/tests/client_test.py b/acme/acme/_internal/tests/client_test.py similarity index 99% rename from acme/tests/client_test.py rename to acme/acme/_internal/tests/client_test.py index 79153a31b..734005b2d 100644 --- a/acme/tests/client_test.py +++ b/acme/acme/_internal/tests/client_test.py @@ -17,10 +17,10 @@ from acme import challenges from acme import errors from acme import jws as acme_jws from acme import messages +from acme._internal.tests import messages_test +from acme._internal.tests import test_util from acme.client import ClientNetwork from acme.client import ClientV2 -import messages_test -import test_util CERT_SAN_PEM = test_util.load_vector('cert-san.pem') CSR_MIXED_PEM = test_util.load_vector('csr-mixed.pem') diff --git a/acme/tests/crypto_util_test.py b/acme/acme/_internal/tests/crypto_util_test.py similarity index 99% rename from acme/tests/crypto_util_test.py rename to acme/acme/_internal/tests/crypto_util_test.py index 409a2ce27..ae1821794 100644 --- a/acme/tests/crypto_util_test.py +++ b/acme/acme/_internal/tests/crypto_util_test.py @@ -14,7 +14,7 @@ import OpenSSL import pytest from acme import errors -import test_util +from acme._internal.tests import test_util class SSLSocketAndProbeSNITest(unittest.TestCase): diff --git a/acme/tests/errors_test.py b/acme/acme/_internal/tests/errors_test.py similarity index 100% rename from acme/tests/errors_test.py rename to acme/acme/_internal/tests/errors_test.py diff --git a/acme/tests/fields_test.py b/acme/acme/_internal/tests/fields_test.py similarity index 100% rename from acme/tests/fields_test.py rename to acme/acme/_internal/tests/fields_test.py diff --git a/acme/tests/jose_test.py b/acme/acme/_internal/tests/jose_test.py similarity index 100% rename from acme/tests/jose_test.py rename to acme/acme/_internal/tests/jose_test.py diff --git a/acme/tests/jws_test.py b/acme/acme/_internal/tests/jws_test.py similarity index 97% rename from acme/tests/jws_test.py rename to acme/acme/_internal/tests/jws_test.py index 901ae970b..016904652 100644 --- a/acme/tests/jws_test.py +++ b/acme/acme/_internal/tests/jws_test.py @@ -5,7 +5,7 @@ import unittest import josepy as jose import pytest -import test_util +from acme._internal.tests import test_util KEY = jose.JWKRSA.load(test_util.load_vector('rsa512_key.pem')) diff --git a/acme/tests/messages_test.py b/acme/acme/_internal/tests/messages_test.py similarity index 99% rename from acme/tests/messages_test.py rename to acme/acme/_internal/tests/messages_test.py index ea7e2feaf..a47541efd 100644 --- a/acme/tests/messages_test.py +++ b/acme/acme/_internal/tests/messages_test.py @@ -10,7 +10,7 @@ import josepy as jose import pytest from acme import challenges -import test_util +from acme._internal.tests import test_util CERT = test_util.load_comparable_cert('cert.der') CSR = test_util.load_comparable_csr('csr.der') diff --git a/acme/tests/standalone_test.py b/acme/acme/_internal/tests/standalone_test.py similarity index 99% rename from acme/tests/standalone_test.py rename to acme/acme/_internal/tests/standalone_test.py index 4fcdceb57..130d8dc7d 100644 --- a/acme/tests/standalone_test.py +++ b/acme/acme/_internal/tests/standalone_test.py @@ -15,7 +15,7 @@ import requests from acme import challenges from acme import crypto_util from acme import errors -import test_util +from acme._internal.tests import test_util class TLSServerTest(unittest.TestCase): diff --git a/acme/tests/test_util.py b/acme/acme/_internal/tests/test_util.py similarity index 100% rename from acme/tests/test_util.py rename to acme/acme/_internal/tests/test_util.py diff --git a/acme/tests/testdata/README b/acme/acme/_internal/tests/testdata/README similarity index 100% rename from acme/tests/testdata/README rename to acme/acme/_internal/tests/testdata/README diff --git a/acme/tests/testdata/cert-100sans.pem b/acme/acme/_internal/tests/testdata/cert-100sans.pem similarity index 100% rename from acme/tests/testdata/cert-100sans.pem rename to acme/acme/_internal/tests/testdata/cert-100sans.pem diff --git a/acme/tests/testdata/cert-idnsans.pem b/acme/acme/_internal/tests/testdata/cert-idnsans.pem similarity index 100% rename from acme/tests/testdata/cert-idnsans.pem rename to acme/acme/_internal/tests/testdata/cert-idnsans.pem diff --git a/acme/tests/testdata/cert-ipsans.pem b/acme/acme/_internal/tests/testdata/cert-ipsans.pem similarity index 100% rename from acme/tests/testdata/cert-ipsans.pem rename to acme/acme/_internal/tests/testdata/cert-ipsans.pem diff --git a/acme/tests/testdata/cert-ipv6sans.pem b/acme/acme/_internal/tests/testdata/cert-ipv6sans.pem similarity index 100% rename from acme/tests/testdata/cert-ipv6sans.pem rename to acme/acme/_internal/tests/testdata/cert-ipv6sans.pem diff --git a/acme/tests/testdata/cert-nocn.der b/acme/acme/_internal/tests/testdata/cert-nocn.der similarity index 100% rename from acme/tests/testdata/cert-nocn.der rename to acme/acme/_internal/tests/testdata/cert-nocn.der diff --git a/acme/tests/testdata/cert-san.pem b/acme/acme/_internal/tests/testdata/cert-san.pem similarity index 100% rename from acme/tests/testdata/cert-san.pem rename to acme/acme/_internal/tests/testdata/cert-san.pem diff --git a/acme/tests/testdata/cert.der b/acme/acme/_internal/tests/testdata/cert.der similarity index 100% rename from acme/tests/testdata/cert.der rename to acme/acme/_internal/tests/testdata/cert.der diff --git a/acme/tests/testdata/cert.pem b/acme/acme/_internal/tests/testdata/cert.pem similarity index 100% rename from acme/tests/testdata/cert.pem rename to acme/acme/_internal/tests/testdata/cert.pem diff --git a/acme/tests/testdata/critical-san.pem b/acme/acme/_internal/tests/testdata/critical-san.pem similarity index 100% rename from acme/tests/testdata/critical-san.pem rename to acme/acme/_internal/tests/testdata/critical-san.pem diff --git a/acme/tests/testdata/csr-100sans.pem b/acme/acme/_internal/tests/testdata/csr-100sans.pem similarity index 100% rename from acme/tests/testdata/csr-100sans.pem rename to acme/acme/_internal/tests/testdata/csr-100sans.pem diff --git a/acme/tests/testdata/csr-6sans.pem b/acme/acme/_internal/tests/testdata/csr-6sans.pem similarity index 100% rename from acme/tests/testdata/csr-6sans.pem rename to acme/acme/_internal/tests/testdata/csr-6sans.pem diff --git a/acme/tests/testdata/csr-idnsans.pem b/acme/acme/_internal/tests/testdata/csr-idnsans.pem similarity index 100% rename from acme/tests/testdata/csr-idnsans.pem rename to acme/acme/_internal/tests/testdata/csr-idnsans.pem diff --git a/acme/tests/testdata/csr-ipsans.pem b/acme/acme/_internal/tests/testdata/csr-ipsans.pem similarity index 100% rename from acme/tests/testdata/csr-ipsans.pem rename to acme/acme/_internal/tests/testdata/csr-ipsans.pem diff --git a/acme/tests/testdata/csr-ipv6sans.pem b/acme/acme/_internal/tests/testdata/csr-ipv6sans.pem similarity index 100% rename from acme/tests/testdata/csr-ipv6sans.pem rename to acme/acme/_internal/tests/testdata/csr-ipv6sans.pem diff --git a/acme/tests/testdata/csr-mixed.pem b/acme/acme/_internal/tests/testdata/csr-mixed.pem similarity index 100% rename from acme/tests/testdata/csr-mixed.pem rename to acme/acme/_internal/tests/testdata/csr-mixed.pem diff --git a/acme/tests/testdata/csr-nosans.pem b/acme/acme/_internal/tests/testdata/csr-nosans.pem similarity index 100% rename from acme/tests/testdata/csr-nosans.pem rename to acme/acme/_internal/tests/testdata/csr-nosans.pem diff --git a/acme/tests/testdata/csr-san.pem b/acme/acme/_internal/tests/testdata/csr-san.pem similarity index 100% rename from acme/tests/testdata/csr-san.pem rename to acme/acme/_internal/tests/testdata/csr-san.pem diff --git a/acme/tests/testdata/csr.der b/acme/acme/_internal/tests/testdata/csr.der similarity index 100% rename from acme/tests/testdata/csr.der rename to acme/acme/_internal/tests/testdata/csr.der diff --git a/acme/tests/testdata/csr.pem b/acme/acme/_internal/tests/testdata/csr.pem similarity index 100% rename from acme/tests/testdata/csr.pem rename to acme/acme/_internal/tests/testdata/csr.pem diff --git a/acme/tests/testdata/dsa512_key.pem b/acme/acme/_internal/tests/testdata/dsa512_key.pem similarity index 100% rename from acme/tests/testdata/dsa512_key.pem rename to acme/acme/_internal/tests/testdata/dsa512_key.pem diff --git a/acme/tests/testdata/ec_secp384r1_key.pem b/acme/acme/_internal/tests/testdata/ec_secp384r1_key.pem similarity index 100% rename from acme/tests/testdata/ec_secp384r1_key.pem rename to acme/acme/_internal/tests/testdata/ec_secp384r1_key.pem diff --git a/acme/tests/testdata/rsa1024_cert.pem b/acme/acme/_internal/tests/testdata/rsa1024_cert.pem similarity index 100% rename from acme/tests/testdata/rsa1024_cert.pem rename to acme/acme/_internal/tests/testdata/rsa1024_cert.pem diff --git a/acme/tests/testdata/rsa1024_key.pem b/acme/acme/_internal/tests/testdata/rsa1024_key.pem similarity index 100% rename from acme/tests/testdata/rsa1024_key.pem rename to acme/acme/_internal/tests/testdata/rsa1024_key.pem diff --git a/acme/tests/testdata/rsa2048_cert.pem b/acme/acme/_internal/tests/testdata/rsa2048_cert.pem similarity index 100% rename from acme/tests/testdata/rsa2048_cert.pem rename to acme/acme/_internal/tests/testdata/rsa2048_cert.pem diff --git a/acme/tests/testdata/rsa2048_key.pem b/acme/acme/_internal/tests/testdata/rsa2048_key.pem similarity index 100% rename from acme/tests/testdata/rsa2048_key.pem rename to acme/acme/_internal/tests/testdata/rsa2048_key.pem diff --git a/acme/tests/testdata/rsa256_key.pem b/acme/acme/_internal/tests/testdata/rsa256_key.pem similarity index 100% rename from acme/tests/testdata/rsa256_key.pem rename to acme/acme/_internal/tests/testdata/rsa256_key.pem diff --git a/acme/tests/testdata/rsa4096_cert.pem b/acme/acme/_internal/tests/testdata/rsa4096_cert.pem similarity index 100% rename from acme/tests/testdata/rsa4096_cert.pem rename to acme/acme/_internal/tests/testdata/rsa4096_cert.pem diff --git a/acme/tests/testdata/rsa4096_key.pem b/acme/acme/_internal/tests/testdata/rsa4096_key.pem similarity index 100% rename from acme/tests/testdata/rsa4096_key.pem rename to acme/acme/_internal/tests/testdata/rsa4096_key.pem diff --git a/acme/tests/testdata/rsa512_key.pem b/acme/acme/_internal/tests/testdata/rsa512_key.pem similarity index 100% rename from acme/tests/testdata/rsa512_key.pem rename to acme/acme/_internal/tests/testdata/rsa512_key.pem diff --git a/acme/tests/util_test.py b/acme/acme/_internal/tests/util_test.py similarity index 100% rename from acme/tests/util_test.py rename to acme/acme/_internal/tests/util_test.py diff --git a/acme/docs/jws-help.txt b/acme/docs/jws-help.txt index bfd16dff4..34cf5ce23 100644 --- a/acme/docs/jws-help.txt +++ b/acme/docs/jws-help.txt @@ -3,6 +3,6 @@ usage: jws [-h] [--compact] {sign,verify} ... positional arguments: {sign,verify} -options: +optional arguments: -h, --help show this help message and exit --compact diff --git a/acme/setup.py b/acme/setup.py index 9ee91676e..904ab162f 100644 --- a/acme/setup.py +++ b/acme/setup.py @@ -3,12 +3,13 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ - 'cryptography>=2.5.0', + 'cryptography>=3.2.1', 'josepy>=1.13.0', - 'PyOpenSSL>=17.5.0', + # pyOpenSSL 23.1.0 is a bad release: https://github.com/pyca/pyopenssl/issues/1199 + 'PyOpenSSL>=17.5.0,!=23.1.0', 'pyrfc3339', 'pytz>=2019.3', 'requests>=2.20.0', diff --git a/certbot-apache/MANIFEST.in b/certbot-apache/MANIFEST.in index 8218838cc..ed73a188e 100644 --- a/certbot-apache/MANIFEST.in +++ b/certbot-apache/MANIFEST.in @@ -1,8 +1,8 @@ include LICENSE.txt include README.rst -recursive-include tests * recursive-include certbot_apache/_internal/augeas_lens *.aug recursive-include certbot_apache/_internal/tls_configs *.conf +recursive-include certbot_apache/_internal/tests/testdata * include certbot_apache/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-apache/certbot_apache/_internal/tests/__init__.py b/certbot-apache/certbot_apache/_internal/tests/__init__.py new file mode 100644 index 000000000..1dae412f2 --- /dev/null +++ b/certbot-apache/certbot_apache/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-apache tests""" diff --git a/certbot-apache/tests/apache-conf-files/NEEDED.txt b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/NEEDED.txt similarity index 100% rename from certbot-apache/tests/apache-conf-files/NEEDED.txt rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/NEEDED.txt diff --git a/certbot-apache/tests/apache-conf-files/apache-conf-test b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test similarity index 100% rename from certbot-apache/tests/apache-conf-files/apache-conf-test rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test diff --git a/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py similarity index 91% rename from certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py index 68bd6287d..383c652f8 100755 --- a/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py +++ b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py @@ -12,9 +12,8 @@ from certbot_integration_tests.utils import acme_server SCRIPT_DIRNAME = os.path.dirname(__file__) -def main(args=None): - if not args: - args = sys.argv[1:] +def main() -> int: + args = sys.argv[1:] with acme_server.ACMEServer('pebble', [], False) as acme_xdist: environ = os.environ.copy() environ['SERVER'] = acme_xdist['directory_url'] diff --git a/certbot-apache/tests/apache-conf-files/failing/missing-double-quote-1724.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/failing/missing-double-quote-1724.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/failing/missing-double-quote-1724.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/failing/missing-double-quote-1724.conf diff --git a/certbot-apache/tests/apache-conf-files/failing/multivhost-1093.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/failing/multivhost-1093.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/failing/multivhost-1093.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/failing/multivhost-1093.conf diff --git a/certbot-apache/tests/apache-conf-files/failing/multivhost-1093b.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/failing/multivhost-1093b.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/failing/multivhost-1093b.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/failing/multivhost-1093b.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/1626-1531.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/1626-1531.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/1626-1531.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/1626-1531.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/README.modules b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/README.modules similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/README.modules rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/README.modules diff --git a/certbot-apache/tests/apache-conf-files/passing/anarcat-1531.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/anarcat-1531.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/anarcat-1531.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/anarcat-1531.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/comment-continuations-2050.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/comment-continuations-2050.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/comment-continuations-2050.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/comment-continuations-2050.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/drupal-errordocument-arg-1724.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/drupal-errordocument-arg-1724.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/drupal-errordocument-arg-1724.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/drupal-errordocument-arg-1724.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/drupal-htaccess-1531.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/drupal-htaccess-1531.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/drupal-htaccess-1531.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/drupal-htaccess-1531.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/escaped-space-arguments-2735.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/escaped-space-arguments-2735.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/escaped-space-arguments-2735.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/escaped-space-arguments-2735.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/example-1755.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/example-1755.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/example-1755.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/example-1755.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/example-ssl.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/example-ssl.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/example-ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/example-ssl.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/example.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/example.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/example.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/example.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/finalize-1243.apache2.conf.txt b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/finalize-1243.apache2.conf.txt similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/finalize-1243.apache2.conf.txt rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/finalize-1243.apache2.conf.txt diff --git a/certbot-apache/tests/apache-conf-files/passing/finalize-1243.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/finalize-1243.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/finalize-1243.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/finalize-1243.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/graphite-quote-1934.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/graphite-quote-1934.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/graphite-quote-1934.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/graphite-quote-1934.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/ipv6-1143.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/ipv6-1143.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/ipv6-1143b.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143b.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/ipv6-1143b.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143b.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/ipv6-1143c.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143c.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/ipv6-1143c.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143c.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/ipv6-1143d.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143d.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/ipv6-1143d.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/ipv6-1143d.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/missing-quote-1724.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/missing-quote-1724.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/missing-quote-1724.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/missing-quote-1724.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/modmacro-1385.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/modmacro-1385.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/modmacro-1385.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/modmacro-1385.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/owncloud-1264.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/owncloud-1264.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/owncloud-1264.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/owncloud-1264.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/rewrite-quote-1960.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/rewrite-quote-1960.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/rewrite-quote-1960.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/rewrite-quote-1960.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/roundcube-1222.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/roundcube-1222.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/roundcube-1222.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/roundcube-1222.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/section-continuations-2525.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/section-continuations-2525.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/section-continuations-2525.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/section-continuations-2525.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/section-empty-continuations-2731.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/section-empty-continuations-2731.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/section-empty-continuations-2731.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/section-empty-continuations-2731.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/semacode-1598.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/semacode-1598.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/semacode-1598.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/semacode-1598.conf diff --git a/certbot-apache/tests/apache-conf-files/passing/sslrequire-wordlist-1827.htaccess b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/sslrequire-wordlist-1827.htaccess similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/sslrequire-wordlist-1827.htaccess rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/sslrequire-wordlist-1827.htaccess diff --git a/certbot-apache/tests/apache-conf-files/passing/two-blocks-one-line-1693.conf b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/two-blocks-one-line-1693.conf similarity index 100% rename from certbot-apache/tests/apache-conf-files/passing/two-blocks-one-line-1693.conf rename to certbot-apache/certbot_apache/_internal/tests/apache-conf-files/passing/two-blocks-one-line-1693.conf diff --git a/certbot-apache/tests/augeasnode_test.py b/certbot-apache/certbot_apache/_internal/tests/augeasnode_test.py similarity index 99% rename from certbot-apache/tests/augeasnode_test.py rename to certbot-apache/certbot_apache/_internal/tests/augeasnode_test.py index 2e977c307..89e1a9828 100644 --- a/certbot-apache/tests/augeasnode_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/augeasnode_test.py @@ -3,11 +3,12 @@ import os from typing import List from unittest import mock +import pytest + from certbot import errors from certbot_apache._internal import assertions from certbot_apache._internal import augeasparser -import util -import pytest +from certbot_apache._internal.tests import util def _get_augeasnode_mock(filepath): diff --git a/certbot-apache/tests/autohsts_test.py b/certbot-apache/certbot_apache/_internal/tests/autohsts_test.py similarity index 99% rename from certbot-apache/tests/autohsts_test.py rename to certbot-apache/certbot_apache/_internal/tests/autohsts_test.py index 48e4f7bf9..4d7d2ec68 100644 --- a/certbot-apache/tests/autohsts_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/autohsts_test.py @@ -9,7 +9,7 @@ import pytest from certbot import errors from certbot_apache._internal import constants -import util +from certbot_apache._internal.tests import util class AutoHSTSTest(util.ApacheTest): diff --git a/certbot-apache/tests/centos_test.py b/certbot-apache/certbot_apache/_internal/tests/centos_test.py similarity index 99% rename from certbot-apache/tests/centos_test.py rename to certbot-apache/certbot_apache/_internal/tests/centos_test.py index 6b0b33377..c6b8e4399 100644 --- a/certbot-apache/tests/centos_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/centos_test.py @@ -10,7 +10,7 @@ from certbot.compat import filesystem from certbot.compat import os from certbot_apache._internal import obj from certbot_apache._internal import override_centos -import util +from certbot_apache._internal.tests import util def get_vh_truth(temp_dir, config_name): diff --git a/certbot-apache/tests/complex_parsing_test.py b/certbot-apache/certbot_apache/_internal/tests/complex_parsing_test.py similarity index 98% rename from certbot-apache/tests/complex_parsing_test.py rename to certbot-apache/certbot_apache/_internal/tests/complex_parsing_test.py index ef06d94d1..6a24b00d1 100644 --- a/certbot-apache/tests/complex_parsing_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/complex_parsing_test.py @@ -7,7 +7,7 @@ import pytest from certbot import errors from certbot.compat import os -import util +from certbot_apache._internal.tests import util class ComplexParserTest(util.ParserTest): diff --git a/certbot-apache/tests/configurator_reverter_test.py b/certbot-apache/certbot_apache/_internal/tests/configurator_reverter_test.py similarity index 98% rename from certbot-apache/tests/configurator_reverter_test.py rename to certbot-apache/certbot_apache/_internal/tests/configurator_reverter_test.py index 21b1188e8..3cbee9474 100644 --- a/certbot-apache/tests/configurator_reverter_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/configurator_reverter_test.py @@ -7,7 +7,7 @@ from unittest import mock import pytest from certbot import errors -import util +from certbot_apache._internal.tests import util class ConfiguratorReverterTest(util.ApacheTest): diff --git a/certbot-apache/tests/configurator_test.py b/certbot-apache/certbot_apache/_internal/tests/configurator_test.py similarity index 99% rename from certbot-apache/tests/configurator_test.py rename to certbot-apache/certbot_apache/_internal/tests/configurator_test.py index 36ee30791..b625cc198 100644 --- a/certbot-apache/tests/configurator_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/configurator_test.py @@ -22,7 +22,7 @@ from certbot_apache._internal import apache_util from certbot_apache._internal import constants from certbot_apache._internal import obj from certbot_apache._internal import parser -import util +from certbot_apache._internal.tests import util class MultipleVhostsTest(util.ApacheTest): diff --git a/certbot-apache/tests/debian_test.py b/certbot-apache/certbot_apache/_internal/tests/debian_test.py similarity index 99% rename from certbot-apache/tests/debian_test.py rename to certbot-apache/certbot_apache/_internal/tests/debian_test.py index ae605264b..50649b67c 100644 --- a/certbot-apache/tests/debian_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/debian_test.py @@ -11,7 +11,7 @@ from certbot.compat import os from certbot.tests import util as certbot_util from certbot_apache._internal import apache_util from certbot_apache._internal import obj -import util +from certbot_apache._internal.tests import util class MultipleVhostsTestDebian(util.ApacheTest): diff --git a/certbot-apache/tests/display_ops_test.py b/certbot-apache/certbot_apache/_internal/tests/display_ops_test.py similarity index 98% rename from certbot-apache/tests/display_ops_test.py rename to certbot-apache/certbot_apache/_internal/tests/display_ops_test.py index 613fa42e9..d08508d3d 100644 --- a/certbot-apache/tests/display_ops_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/display_ops_test.py @@ -10,7 +10,7 @@ from certbot.display import util as display_util from certbot.tests import util as certbot_util from certbot_apache._internal import obj from certbot_apache._internal.display_ops import select_vhost_multiple -import util +from certbot_apache._internal.tests import util class SelectVhostMultiTest(unittest.TestCase): diff --git a/certbot-apache/tests/dualnode_test.py b/certbot-apache/certbot_apache/_internal/tests/dualnode_test.py similarity index 100% rename from certbot-apache/tests/dualnode_test.py rename to certbot-apache/certbot_apache/_internal/tests/dualnode_test.py diff --git a/certbot-apache/tests/entrypoint_test.py b/certbot-apache/certbot_apache/_internal/tests/entrypoint_test.py similarity index 100% rename from certbot-apache/tests/entrypoint_test.py rename to certbot-apache/certbot_apache/_internal/tests/entrypoint_test.py diff --git a/certbot-apache/tests/fedora_test.py b/certbot-apache/certbot_apache/_internal/tests/fedora_test.py similarity index 99% rename from certbot-apache/tests/fedora_test.py rename to certbot-apache/certbot_apache/_internal/tests/fedora_test.py index a313feb00..a2c198534 100644 --- a/certbot-apache/tests/fedora_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/fedora_test.py @@ -10,7 +10,7 @@ from certbot.compat import filesystem from certbot.compat import os from certbot_apache._internal import obj from certbot_apache._internal import override_fedora -import util +from certbot_apache._internal.tests import util def get_vh_truth(temp_dir, config_name): diff --git a/certbot-apache/tests/gentoo_test.py b/certbot-apache/certbot_apache/_internal/tests/gentoo_test.py similarity index 99% rename from certbot-apache/tests/gentoo_test.py rename to certbot-apache/certbot_apache/_internal/tests/gentoo_test.py index 0774a6e8b..0a4cc178d 100644 --- a/certbot-apache/tests/gentoo_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/gentoo_test.py @@ -10,7 +10,7 @@ from certbot.compat import filesystem from certbot.compat import os from certbot_apache._internal import obj from certbot_apache._internal import override_gentoo -import util +from certbot_apache._internal.tests import util def get_vh_truth(temp_dir, config_name): diff --git a/certbot-apache/tests/http_01_test.py b/certbot-apache/certbot_apache/_internal/tests/http_01_test.py similarity index 99% rename from certbot-apache/tests/http_01_test.py rename to certbot-apache/certbot_apache/_internal/tests/http_01_test.py index b73be6f4f..3ba34f3fa 100644 --- a/certbot-apache/tests/http_01_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/http_01_test.py @@ -14,7 +14,7 @@ from certbot.compat import filesystem from certbot.compat import os from certbot.tests import acme_util from certbot_apache._internal.parser import get_aug_path -import util +from certbot_apache._internal.tests import util NUM_ACHALLS = 3 diff --git a/certbot-apache/tests/obj_test.py b/certbot-apache/certbot_apache/_internal/tests/obj_test.py similarity index 100% rename from certbot-apache/tests/obj_test.py rename to certbot-apache/certbot_apache/_internal/tests/obj_test.py diff --git a/certbot-apache/tests/parser_test.py b/certbot-apache/certbot_apache/_internal/tests/parser_test.py similarity index 99% rename from certbot-apache/tests/parser_test.py rename to certbot-apache/certbot_apache/_internal/tests/parser_test.py index b4d13c78e..6bbc33385 100644 --- a/certbot-apache/tests/parser_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/parser_test.py @@ -8,7 +8,7 @@ import pytest from certbot import errors from certbot.compat import os -import util +from certbot_apache._internal.tests import util class BasicParserTest(util.ParserTest): diff --git a/certbot-apache/tests/parsernode_configurator_test.py b/certbot-apache/certbot_apache/_internal/tests/parsernode_configurator_test.py similarity index 97% rename from certbot-apache/tests/parsernode_configurator_test.py rename to certbot-apache/certbot_apache/_internal/tests/parsernode_configurator_test.py index b9f74dfbb..596b424f7 100644 --- a/certbot-apache/tests/parsernode_configurator_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/parsernode_configurator_test.py @@ -5,7 +5,7 @@ from unittest import mock import pytest -import util +from certbot_apache._internal.tests import util try: import apacheconfig diff --git a/certbot-apache/tests/parsernode_test.py b/certbot-apache/certbot_apache/_internal/tests/parsernode_test.py similarity index 100% rename from certbot-apache/tests/parsernode_test.py rename to certbot-apache/certbot_apache/_internal/tests/parsernode_test.py diff --git a/certbot-apache/tests/parsernode_util_test.py b/certbot-apache/certbot_apache/_internal/tests/parsernode_util_test.py similarity index 100% rename from certbot-apache/tests/parsernode_util_test.py rename to certbot-apache/certbot_apache/_internal/tests/parsernode_util_test.py diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/README b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/README similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/README rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/README diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/autoindex.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/autoindex.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/autoindex.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/autoindex.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/centos.example.com.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/centos.example.com.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/centos.example.com.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/centos.example.com.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/ssl.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/userdir.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/userdir.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/userdir.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/userdir.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/welcome.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/welcome.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.d/welcome.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/welcome.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-base.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-base.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-base.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-base.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-dav.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-dav.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-dav.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-dav.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-lua.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-lua.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-lua.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-lua.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-mpm.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-mpm.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-mpm.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-mpm.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-proxy.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-proxy.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-proxy.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-proxy.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-ssl.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-systemd.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-systemd.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-systemd.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-systemd.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/01-cgi.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/01-cgi.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/01-cgi.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/01-cgi.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf/httpd.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf/httpd.conf similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf/httpd.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf/httpd.conf diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf/magic b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf/magic similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/httpd/conf/magic rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf/magic diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/sites b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/sites similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/sites rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/sites diff --git a/certbot-apache/tests/testdata/centos7_apache/apache/sysconfig/httpd b/certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/sysconfig/httpd similarity index 100% rename from certbot-apache/tests/testdata/centos7_apache/apache/sysconfig/httpd rename to certbot-apache/certbot_apache/_internal/tests/testdata/centos7_apache/apache/sysconfig/httpd diff --git a/certbot-apache/tests/testdata/complex_parsing/apache2.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/apache2.conf similarity index 100% rename from certbot-apache/tests/testdata/complex_parsing/apache2.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/apache2.conf diff --git a/certbot-apache/tests/testdata/complex_parsing/conf-enabled/dummy.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/conf-enabled/dummy.conf similarity index 100% rename from certbot-apache/tests/testdata/complex_parsing/conf-enabled/dummy.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/conf-enabled/dummy.conf diff --git a/certbot-apache/tests/testdata/complex_parsing/test_fnmatch.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/test_fnmatch.conf similarity index 100% rename from certbot-apache/tests/testdata/complex_parsing/test_fnmatch.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/test_fnmatch.conf diff --git a/certbot-apache/tests/testdata/complex_parsing/test_variables.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/test_variables.conf similarity index 100% rename from certbot-apache/tests/testdata/complex_parsing/test_variables.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/complex_parsing/test_variables.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/apache2.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/apache2.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/apache2.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/apache2.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/bad_conf_file.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/bad_conf_file.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/bad_conf_file.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/bad_conf_file.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/other-vhosts-access-log.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/other-vhosts-access-log.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/other-vhosts-access-log.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/other-vhosts-access-log.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/security.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/security.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/security.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/security.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/serve-cgi-bin.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/serve-cgi-bin.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/serve-cgi-bin.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/serve-cgi-bin.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/security.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/security.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/security.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/security.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/serve-cgi-bin.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/serve-cgi-bin.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/serve-cgi-bin.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/serve-cgi-bin.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/envvars b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/envvars similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/envvars rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/envvars diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/authz_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/authz_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/authz_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/authz_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/rewrite.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/rewrite.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/rewrite.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/rewrite.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/authz_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/authz_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/authz_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/authz_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/ports.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/ports.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/ports.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/ports.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/another_wildcard.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/another_wildcard.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/another_wildcard.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/another_wildcard.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/old-and-default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/old-and-default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/old-and-default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/old-and-default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/wildcard.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/wildcard.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/wildcard.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/wildcard.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/another_wildcard.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/another_wildcard.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/another_wildcard.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/another_wildcard.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/old-and-default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/old-and-default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/old-and-default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/old-and-default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/wildcard.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/wildcard.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/wildcard.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/wildcard.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/sites b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/sites similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/augeas_vhosts/sites rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/sites diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/apache2.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/apache2.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/apache2.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/apache2.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/other-vhosts-access-log.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/other-vhosts-access-log.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/other-vhosts-access-log.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/other-vhosts-access-log.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/security.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/security.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/security.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/security.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/serve-cgi-bin.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/serve-cgi-bin.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/serve-cgi-bin.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/serve-cgi-bin.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/other-vhosts-access-log.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/other-vhosts-access-log.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/other-vhosts-access-log.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/other-vhosts-access-log.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/security.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/security.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/security.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/security.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/serve-cgi-bin.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/serve-cgi-bin.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/serve-cgi-bin.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/serve-cgi-bin.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/envvars b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/envvars similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/envvars rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/envvars diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/ports.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/ports.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/ports.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/ports.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/000-default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/000-default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/000-default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/000-default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/default-ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/default-ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/default-ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/default-ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-enabled/000-default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-enabled/000-default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-enabled/000-default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-enabled/000-default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/sites b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/sites similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/default_vhost/sites rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/sites diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/apache2.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/apache2.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/apache2.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/apache2.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/envvars b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/envvars similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/envvars rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/envvars diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/ports.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/ports.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/ports.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/ports.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/multi-vhost.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/multi-vhost.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/multi-vhost.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/multi-vhost.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/multi-vhost.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/multi-vhost.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/multi-vhost.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/multi-vhost.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/apache2.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/apache2.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/apache2.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/apache2.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/bad_conf_file.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/bad_conf_file.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/bad_conf_file.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/bad_conf_file.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/other-vhosts-access-log.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/other-vhosts-access-log.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/other-vhosts-access-log.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/other-vhosts-access-log.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/security.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/security.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/security.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/security.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/serve-cgi-bin.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/serve-cgi-bin.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/serve-cgi-bin.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/serve-cgi-bin.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/security.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/security.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/security.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/security.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/serve-cgi-bin.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/serve-cgi-bin.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/serve-cgi-bin.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/serve-cgi-bin.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/envvars b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/envvars similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/envvars rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/envvars diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/authz_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/authz_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/authz_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/authz_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/rewrite.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/rewrite.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/rewrite.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/rewrite.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/authz_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/authz_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/authz_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/authz_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.load b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.load similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.load rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.load diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/ports.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/ports.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/ports.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/ports.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/000-default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/000-default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/000-default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/000-default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/certbot.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/certbot.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/certbot.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/certbot.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl-port-only.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl-port-only.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl-port-only.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl-port-only.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttp.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttp.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttp.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttp.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttps.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttps.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttps.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttps.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/empty.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/empty.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/empty.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/empty.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/mod_macro-example.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/mod_macro-example.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/mod_macro-example.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/mod_macro-example.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/ocsp-ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/ocsp-ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/ocsp-ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/ocsp-ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/wildcard.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/wildcard.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/wildcard.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/wildcard.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/000-default.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/000-default.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/000-default.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/000-default.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/certbot.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/certbot.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/certbot.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/certbot.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl-port-only.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl-port-only.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl-port-only.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl-port-only.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttp.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttp.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttp.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttp.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttps.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttps.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttps.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttps.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/encryption-example.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/encryption-example.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/encryption-example.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/encryption-example.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/mod_macro-example.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/mod_macro-example.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/mod_macro-example.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/mod_macro-example.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/non-symlink.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/non-symlink.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/non-symlink.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/non-symlink.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/ocsp-ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/ocsp-ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/ocsp-ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/ocsp-ssl.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/wildcard.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/wildcard.conf similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/wildcard.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/wildcard.conf diff --git a/certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/sites b/certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/sites similarity index 100% rename from certbot-apache/tests/testdata/debian_apache_2_4/multiple_vhosts/sites rename to certbot-apache/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/sites diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/httpd.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/httpd.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/httpd.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/httpd.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/magic b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/magic similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/magic rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/magic diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_default_settings.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_default_settings.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_default_settings.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_default_settings.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_error_documents.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_error_documents.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_error_documents.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_error_documents.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_languages.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_languages.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_languages.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_languages.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_autoindex.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_autoindex.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_autoindex.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_autoindex.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_info.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_info.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_info.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_info.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_log_config.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_log_config.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_log_config.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_log_config.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_mime.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_mime.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_mime.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_mime.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_status.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_status.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_status.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_status.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_userdir.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_userdir.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_userdir.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_userdir.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mpm.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mpm.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mpm.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mpm.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/10_mod_mem_cache.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/10_mod_mem_cache.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/10_mod_mem_cache.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/10_mod_mem_cache.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/40_mod_ssl.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/40_mod_ssl.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/40_mod_ssl.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/40_mod_ssl.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/41_mod_http2.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/41_mod_http2.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/41_mod_http2.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/41_mod_http2.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/45_mod_dav.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/45_mod_dav.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/45_mod_dav.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/45_mod_dav.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/46_mod_ldap.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/46_mod_ldap.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/modules.d/46_mod_ldap.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/46_mod_ldap.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_ssl_vhost.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_ssl_vhost.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_ssl_vhost.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_ssl_vhost.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_vhost.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_vhost.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_vhost.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_vhost.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/default_vhost.include b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/default_vhost.include similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/default_vhost.include rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/default_vhost.include diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/gentoo.example.com.conf b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/gentoo.example.com.conf similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/gentoo.example.com.conf rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/gentoo.example.com.conf diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/conf.d/apache2 b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/conf.d/apache2 similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/conf.d/apache2 rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/conf.d/apache2 diff --git a/certbot-apache/tests/testdata/gentoo_apache/apache/sites b/certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/sites similarity index 100% rename from certbot-apache/tests/testdata/gentoo_apache/apache/sites rename to certbot-apache/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/sites diff --git a/certbot-apache/tests/util.py b/certbot-apache/certbot_apache/_internal/tests/util.py similarity index 100% rename from certbot-apache/tests/util.py rename to certbot-apache/certbot_apache/_internal/tests/util.py diff --git a/certbot-apache/setup.py b/certbot-apache/setup.py index 5f8f86292..18f60bfea 100644 --- a/certbot-apache/setup.py +++ b/certbot-apache/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ # We specify the minimum acme and certbot version as the current plugin diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py index 6df79c7f9..8ed1fbf1e 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py @@ -936,3 +936,24 @@ def test_preferred_chain(context: IntegrationTestsContext) -> None: with open(conf_path, 'r') as f: assert f'preferred_chain = {requested}' in f.read(), \ 'Expected preferred_chain to be set in renewal config' + + +def test_ancient_rsa_key_type_preserved(context: IntegrationTestsContext) -> None: + certname = context.get_domain('newname') + context.certbot(['certonly', '-d', certname, '--key-type', 'rsa']) + assert_saved_lineage_option(context.config_dir, certname, 'key_type', 'rsa') + + # Remove `key_type = rsa` from the renewal config to emulate a =1.5.1', diff --git a/certbot-dns-digitalocean/MANIFEST.in b/certbot-dns-digitalocean/MANIFEST.in index 1c12b0fb1..1e0a83569 100644 --- a/certbot-dns-digitalocean/MANIFEST.in +++ b/certbot-dns-digitalocean/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_digitalocean/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-digitalocean/certbot_dns_digitalocean/_internal/tests/__init__.py b/certbot-dns-digitalocean/certbot_dns_digitalocean/_internal/tests/__init__.py new file mode 100644 index 000000000..0272d510c --- /dev/null +++ b/certbot-dns-digitalocean/certbot_dns_digitalocean/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-digitalocean tests""" diff --git a/certbot-dns-digitalocean/tests/dns_digitalocean_test.py b/certbot-dns-digitalocean/certbot_dns_digitalocean/_internal/tests/dns_digitalocean_test.py similarity index 100% rename from certbot-dns-digitalocean/tests/dns_digitalocean_test.py rename to certbot-dns-digitalocean/certbot_dns_digitalocean/_internal/tests/dns_digitalocean_test.py diff --git a/certbot-dns-digitalocean/setup.py b/certbot-dns-digitalocean/setup.py index 34a420f8a..c378ee149 100644 --- a/certbot-dns-digitalocean/setup.py +++ b/certbot-dns-digitalocean/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'python-digitalocean>=1.11', # 1.15.0 or newer is recommended for TTL support diff --git a/certbot-dns-dnsimple/MANIFEST.in b/certbot-dns-dnsimple/MANIFEST.in index 884df79eb..af8af4c29 100644 --- a/certbot-dns-dnsimple/MANIFEST.in +++ b/certbot-dns-dnsimple/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_dnsimple/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-dnsimple/certbot_dns_dnsimple/_internal/tests/__init__.py b/certbot-dns-dnsimple/certbot_dns_dnsimple/_internal/tests/__init__.py new file mode 100644 index 000000000..a72b74812 --- /dev/null +++ b/certbot-dns-dnsimple/certbot_dns_dnsimple/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-dnsimple tests""" diff --git a/certbot-dns-dnsimple/tests/dns_dnsimple_test.py b/certbot-dns-dnsimple/certbot_dns_dnsimple/_internal/tests/dns_dnsimple_test.py similarity index 100% rename from certbot-dns-dnsimple/tests/dns_dnsimple_test.py rename to certbot-dns-dnsimple/certbot_dns_dnsimple/_internal/tests/dns_dnsimple_test.py diff --git a/certbot-dns-dnsimple/setup.py b/certbot-dns-dnsimple/setup.py index b0ba741e8..b2b74180a 100644 --- a/certbot-dns-dnsimple/setup.py +++ b/certbot-dns-dnsimple/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ # This version of lexicon is required to address the problem described in diff --git a/certbot-dns-dnsmadeeasy/MANIFEST.in b/certbot-dns-dnsmadeeasy/MANIFEST.in index 3b4a6eadc..7d6af8f57 100644 --- a/certbot-dns-dnsmadeeasy/MANIFEST.in +++ b/certbot-dns-dnsmadeeasy/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_dnsmadeeasy/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy/_internal/tests/__init__.py b/certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy/_internal/tests/__init__.py new file mode 100644 index 000000000..d38880019 --- /dev/null +++ b/certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-dnsmadeeasy tests""" diff --git a/certbot-dns-dnsmadeeasy/tests/dns_dnsmadeeasy_test.py b/certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy/_internal/tests/dns_dnsmadeeasy_test.py similarity index 100% rename from certbot-dns-dnsmadeeasy/tests/dns_dnsmadeeasy_test.py rename to certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy/_internal/tests/dns_dnsmadeeasy_test.py diff --git a/certbot-dns-dnsmadeeasy/setup.py b/certbot-dns-dnsmadeeasy/setup.py index 46964739d..4959ccc19 100644 --- a/certbot-dns-dnsmadeeasy/setup.py +++ b/certbot-dns-dnsmadeeasy/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-gehirn/MANIFEST.in b/certbot-dns-gehirn/MANIFEST.in index 88391b8d2..31f5b9373 100644 --- a/certbot-dns-gehirn/MANIFEST.in +++ b/certbot-dns-gehirn/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_gehirn/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-gehirn/certbot_dns_gehirn/_internal/tests/__init__.py b/certbot-dns-gehirn/certbot_dns_gehirn/_internal/tests/__init__.py new file mode 100644 index 000000000..ef31d57a3 --- /dev/null +++ b/certbot-dns-gehirn/certbot_dns_gehirn/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-gehirn tests""" diff --git a/certbot-dns-gehirn/tests/dns_gehirn_test.py b/certbot-dns-gehirn/certbot_dns_gehirn/_internal/tests/dns_gehirn_test.py similarity index 100% rename from certbot-dns-gehirn/tests/dns_gehirn_test.py rename to certbot-dns-gehirn/certbot_dns_gehirn/_internal/tests/dns_gehirn_test.py diff --git a/certbot-dns-gehirn/setup.py b/certbot-dns-gehirn/setup.py index 8f8ecac5e..76beb15a1 100644 --- a/certbot-dns-gehirn/setup.py +++ b/certbot-dns-gehirn/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-google/MANIFEST.in b/certbot-dns-google/MANIFEST.in index a0a51c58e..da8f308b4 100644 --- a/certbot-dns-google/MANIFEST.in +++ b/certbot-dns-google/MANIFEST.in @@ -1,8 +1,7 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include certbot_dns_google/testdata * -recursive-include tests * +recursive-include certbot_dns_google/_internal/tests/testdata * include certbot_dns_google/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-google/certbot_dns_google/_internal/tests/__init__.py b/certbot-dns-google/certbot_dns_google/_internal/tests/__init__.py new file mode 100644 index 000000000..06d4a72eb --- /dev/null +++ b/certbot-dns-google/certbot_dns_google/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-google tests""" diff --git a/certbot-dns-google/tests/dns_google_test.py b/certbot-dns-google/certbot_dns_google/_internal/tests/dns_google_test.py similarity index 100% rename from certbot-dns-google/tests/dns_google_test.py rename to certbot-dns-google/certbot_dns_google/_internal/tests/dns_google_test.py diff --git a/certbot-dns-google/tests/testdata/discovery.json b/certbot-dns-google/certbot_dns_google/_internal/tests/testdata/discovery.json similarity index 100% rename from certbot-dns-google/tests/testdata/discovery.json rename to certbot-dns-google/certbot_dns_google/_internal/tests/testdata/discovery.json diff --git a/certbot-dns-google/setup.py b/certbot-dns-google/setup.py index 2b5a454e5..252238c4f 100644 --- a/certbot-dns-google/setup.py +++ b/certbot-dns-google/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'google-api-python-client>=1.5.5', diff --git a/certbot-dns-linode/MANIFEST.in b/certbot-dns-linode/MANIFEST.in index 5fe9aa12f..cf0cb2095 100644 --- a/certbot-dns-linode/MANIFEST.in +++ b/certbot-dns-linode/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_linode/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-linode/certbot_dns_linode/_internal/tests/__init__.py b/certbot-dns-linode/certbot_dns_linode/_internal/tests/__init__.py new file mode 100644 index 000000000..b096c54b2 --- /dev/null +++ b/certbot-dns-linode/certbot_dns_linode/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-linode tests""" diff --git a/certbot-dns-linode/tests/dns_linode_test.py b/certbot-dns-linode/certbot_dns_linode/_internal/tests/dns_linode_test.py similarity index 100% rename from certbot-dns-linode/tests/dns_linode_test.py rename to certbot-dns-linode/certbot_dns_linode/_internal/tests/dns_linode_test.py diff --git a/certbot-dns-linode/setup.py b/certbot-dns-linode/setup.py index fea7ed60c..e6690e93b 100644 --- a/certbot-dns-linode/setup.py +++ b/certbot-dns-linode/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-luadns/MANIFEST.in b/certbot-dns-luadns/MANIFEST.in index 7ad398a32..a85086559 100644 --- a/certbot-dns-luadns/MANIFEST.in +++ b/certbot-dns-luadns/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_luadns/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-luadns/certbot_dns_luadns/_internal/tests/__init__.py b/certbot-dns-luadns/certbot_dns_luadns/_internal/tests/__init__.py new file mode 100644 index 000000000..2688bd482 --- /dev/null +++ b/certbot-dns-luadns/certbot_dns_luadns/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-luadns tests""" diff --git a/certbot-dns-luadns/tests/dns_luadns_test.py b/certbot-dns-luadns/certbot_dns_luadns/_internal/tests/dns_luadns_test.py similarity index 100% rename from certbot-dns-luadns/tests/dns_luadns_test.py rename to certbot-dns-luadns/certbot_dns_luadns/_internal/tests/dns_luadns_test.py diff --git a/certbot-dns-luadns/setup.py b/certbot-dns-luadns/setup.py index d20499b00..e61c6d317 100644 --- a/certbot-dns-luadns/setup.py +++ b/certbot-dns-luadns/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-nsone/MANIFEST.in b/certbot-dns-nsone/MANIFEST.in index 5865f6744..24453af9a 100644 --- a/certbot-dns-nsone/MANIFEST.in +++ b/certbot-dns-nsone/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_nsone/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-nsone/certbot_dns_nsone/_internal/tests/__init__.py b/certbot-dns-nsone/certbot_dns_nsone/_internal/tests/__init__.py new file mode 100644 index 000000000..08e5305f8 --- /dev/null +++ b/certbot-dns-nsone/certbot_dns_nsone/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-nsone tests""" diff --git a/certbot-dns-nsone/tests/dns_nsone_test.py b/certbot-dns-nsone/certbot_dns_nsone/_internal/tests/dns_nsone_test.py similarity index 100% rename from certbot-dns-nsone/tests/dns_nsone_test.py rename to certbot-dns-nsone/certbot_dns_nsone/_internal/tests/dns_nsone_test.py diff --git a/certbot-dns-nsone/setup.py b/certbot-dns-nsone/setup.py index 61e64de65..dd452de44 100644 --- a/certbot-dns-nsone/setup.py +++ b/certbot-dns-nsone/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-ovh/MANIFEST.in b/certbot-dns-ovh/MANIFEST.in index 3635a2d0d..9e7bdcb78 100644 --- a/certbot-dns-ovh/MANIFEST.in +++ b/certbot-dns-ovh/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_ovh/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-ovh/certbot_dns_ovh/_internal/tests/__init__.py b/certbot-dns-ovh/certbot_dns_ovh/_internal/tests/__init__.py new file mode 100644 index 000000000..9c378993d --- /dev/null +++ b/certbot-dns-ovh/certbot_dns_ovh/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-ovh tests""" diff --git a/certbot-dns-ovh/tests/dns_ovh_test.py b/certbot-dns-ovh/certbot_dns_ovh/_internal/tests/dns_ovh_test.py similarity index 100% rename from certbot-dns-ovh/tests/dns_ovh_test.py rename to certbot-dns-ovh/certbot_dns_ovh/_internal/tests/dns_ovh_test.py diff --git a/certbot-dns-ovh/setup.py b/certbot-dns-ovh/setup.py index 1d1647541..eea84d5df 100644 --- a/certbot-dns-ovh/setup.py +++ b/certbot-dns-ovh/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-rfc2136/MANIFEST.in b/certbot-dns-rfc2136/MANIFEST.in index 2e902def3..298aeab71 100644 --- a/certbot-dns-rfc2136/MANIFEST.in +++ b/certbot-dns-rfc2136/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_rfc2136/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-rfc2136/certbot_dns_rfc2136/__init__.py b/certbot-dns-rfc2136/certbot_dns_rfc2136/__init__.py index 19734d29b..3df0b8172 100644 --- a/certbot-dns-rfc2136/certbot_dns_rfc2136/__init__.py +++ b/certbot-dns-rfc2136/certbot_dns_rfc2136/__init__.py @@ -161,8 +161,8 @@ queries to, with an zone option. The zone will be then visible in both zones with exactly the same content. .. note:: - Order matters in BIND views, the ``in-view`` zone option must refer to a - view defined preceeding it, it cannot refer to a view defined later in the configuration file. + Order matters in BIND views: the ``in-view`` zone option must refer to a + view defined preceeding it. It cannot refer to a view defined later in the configuration file. .. code-block:: none :caption: Split-view BIND configuration diff --git a/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/tests/__init__.py b/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/tests/__init__.py new file mode 100644 index 000000000..cf8982942 --- /dev/null +++ b/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-rfc2136 tests""" diff --git a/certbot-dns-rfc2136/tests/dns_rfc2136_test.py b/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/tests/dns_rfc2136_test.py similarity index 100% rename from certbot-dns-rfc2136/tests/dns_rfc2136_test.py rename to certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/tests/dns_rfc2136_test.py diff --git a/certbot-dns-rfc2136/setup.py b/certbot-dns-rfc2136/setup.py index 29d63ce62..f1822f128 100644 --- a/certbot-dns-rfc2136/setup.py +++ b/certbot-dns-rfc2136/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dnspython>=1.15.0', diff --git a/certbot-dns-route53/MANIFEST.in b/certbot-dns-route53/MANIFEST.in index 2e4d4272c..a5df132f1 100644 --- a/certbot-dns-route53/MANIFEST.in +++ b/certbot-dns-route53/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_route53/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-route53/certbot_dns_route53/_internal/tests/__init__.py b/certbot-dns-route53/certbot_dns_route53/_internal/tests/__init__.py new file mode 100644 index 000000000..a0ae87f1c --- /dev/null +++ b/certbot-dns-route53/certbot_dns_route53/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-route53 tests""" diff --git a/certbot-dns-route53/tests/dns_route53_test.py b/certbot-dns-route53/certbot_dns_route53/_internal/tests/dns_route53_test.py similarity index 100% rename from certbot-dns-route53/tests/dns_route53_test.py rename to certbot-dns-route53/certbot_dns_route53/_internal/tests/dns_route53_test.py diff --git a/certbot-dns-route53/setup.py b/certbot-dns-route53/setup.py index 2be7d62fb..7a0097df0 100644 --- a/certbot-dns-route53/setup.py +++ b/certbot-dns-route53/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'boto3>=1.15.15', diff --git a/certbot-dns-sakuracloud/MANIFEST.in b/certbot-dns-sakuracloud/MANIFEST.in index 31681266f..0a97923fe 100644 --- a/certbot-dns-sakuracloud/MANIFEST.in +++ b/certbot-dns-sakuracloud/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_sakuracloud/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-sakuracloud/certbot_dns_sakuracloud/_internal/tests/__init__.py b/certbot-dns-sakuracloud/certbot_dns_sakuracloud/_internal/tests/__init__.py new file mode 100644 index 000000000..e08a3ebac --- /dev/null +++ b/certbot-dns-sakuracloud/certbot_dns_sakuracloud/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-sakuracloud tests""" diff --git a/certbot-dns-sakuracloud/tests/dns_sakuracloud_test.py b/certbot-dns-sakuracloud/certbot_dns_sakuracloud/_internal/tests/dns_sakuracloud_test.py similarity index 100% rename from certbot-dns-sakuracloud/tests/dns_sakuracloud_test.py rename to certbot-dns-sakuracloud/certbot_dns_sakuracloud/_internal/tests/dns_sakuracloud_test.py diff --git a/certbot-dns-sakuracloud/setup.py b/certbot-dns-sakuracloud/setup.py index 777c00318..65f5e8b27 100644 --- a/certbot-dns-sakuracloud/setup.py +++ b/certbot-dns-sakuracloud/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-nginx/MANIFEST.in b/certbot-nginx/MANIFEST.in index 995b08833..41fd46f5a 100644 --- a/certbot-nginx/MANIFEST.in +++ b/certbot-nginx/MANIFEST.in @@ -1,7 +1,7 @@ include LICENSE.txt include README.rst -recursive-include tests * recursive-include certbot_nginx/_internal/tls_configs *.conf +recursive-include certbot_nginx/_internal/tests/testdata * include certbot_nginx/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-nginx/certbot_nginx/_internal/parser_obj.py b/certbot-nginx/certbot_nginx/_internal/parser_obj.py index 0af38a936..7a0946500 100644 --- a/certbot-nginx/certbot_nginx/_internal/parser_obj.py +++ b/certbot-nginx/certbot_nginx/_internal/parser_obj.py @@ -1,5 +1,6 @@ # type: ignore -# This module is not used for now, so we just skip type check for the sake of simplicity. +# This module is not used for now, so we just skip type checking for the sake +# of simplicity. """ This file contains parsing routines and object classes to help derive meaning from raw lists of tokens from pyparsing. """ diff --git a/certbot-nginx/certbot_nginx/_internal/tests/__init__.py b/certbot-nginx/certbot_nginx/_internal/tests/__init__.py new file mode 100644 index 000000000..7ddcf58b0 --- /dev/null +++ b/certbot-nginx/certbot_nginx/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-nginx tests""" diff --git a/certbot-nginx/tests/configurator_test.py b/certbot-nginx/certbot_nginx/_internal/tests/configurator_test.py similarity index 99% rename from certbot-nginx/tests/configurator_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/configurator_test.py index 8449c8ad5..7f02f5b3f 100644 --- a/certbot-nginx/tests/configurator_test.py +++ b/certbot-nginx/certbot_nginx/_internal/tests/configurator_test.py @@ -17,7 +17,7 @@ from certbot_nginx._internal import obj from certbot_nginx._internal import parser from certbot_nginx._internal.configurator import _redirect_block_for_domain from certbot_nginx._internal.nginxparser import UnspacedList -import test_util as util +from certbot_nginx._internal.tests import test_util as util class NginxConfiguratorTest(util.NginxTest): diff --git a/certbot-nginx/tests/display_ops_test.py b/certbot-nginx/certbot_nginx/_internal/tests/display_ops_test.py similarity index 96% rename from certbot-nginx/tests/display_ops_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/display_ops_test.py index 4e9266c52..3246b3255 100644 --- a/certbot-nginx/tests/display_ops_test.py +++ b/certbot-nginx/certbot_nginx/_internal/tests/display_ops_test.py @@ -8,7 +8,7 @@ from certbot.display import util as display_util from certbot.tests import util as certbot_util from certbot_nginx._internal import parser from certbot_nginx._internal.display_ops import select_vhost_multiple -import test_util as util +from certbot_nginx._internal.tests import test_util as util class SelectVhostMultiTest(util.NginxTest): diff --git a/certbot-nginx/tests/http_01_test.py b/certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py similarity index 97% rename from certbot-nginx/tests/http_01_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py index e0809f68a..c81357607 100644 --- a/certbot-nginx/tests/http_01_test.py +++ b/certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py @@ -7,11 +7,12 @@ import josepy as jose import pytest from acme import challenges +from acme import messages from certbot import achallenges from certbot.tests import acme_util from certbot.tests import util as test_util from certbot_nginx._internal.obj import Addr -import test_util as util +from certbot_nginx._internal.tests import test_util as util AUTH_KEY = jose.JWKRSA.load(test_util.load_vector("rsa512_key.pem")) @@ -23,29 +24,29 @@ class HttpPerformTest(util.NginxTest): achalls = [ achallenges.KeyAuthorizationAnnotatedChallenge( challb=acme_util.chall_to_challb( - challenges.HTTP01(token=b"kNdwjwOeX0I_A8DXt9Msmg"), "pending"), + challenges.HTTP01(token=b"kNdwjwOeX0I_A8DXt9Msmg"), messages.STATUS_PENDING), domain="www.example.com", account_key=account_key), achallenges.KeyAuthorizationAnnotatedChallenge( challb=acme_util.chall_to_challb( challenges.HTTP01( token=b"\xba\xa9\xda?={version}', f'certbot>={version}', - 'PyOpenSSL>=17.5.0', + # pyOpenSSL 23.1.0 is a bad release: https://github.com/pyca/pyopenssl/issues/1199 + 'PyOpenSSL>=17.5.0,!=23.1.0', 'pyparsing>=2.2.1', 'setuptools>=41.6.0', ] diff --git a/certbot-nginx/tests/boulder-integration.conf.sh b/certbot-nginx/tests/boulder-integration.conf.sh deleted file mode 100755 index 35cedf5ed..000000000 --- a/certbot-nginx/tests/boulder-integration.conf.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -# Based on -# https://www.exratione.com/2014/03/running-nginx-as-a-non-root-user/ -# https://github.com/exratione/non-root-nginx/blob/9a77f62e5d5cb9c9026fd62eece76b9514011019/nginx.conf - -# USAGE: ./boulder-integration.conf.sh /path/to/root cert.key cert.pem >> nginx.conf - -ROOT=$1 -CERT_KEY_PATH=$2 -CERT_PATH=$3 - -cat <=v2.0.0 may + have had their RSA certificates inadvertently changed to ECDSA certificates. If desired, + the key type may be changed back to RSA. See the [User Guide](https://eff-certbot.readthedocs.io/en/stable/using.html#changing-a-certificate-s-key-type). +* Deprecated flags were inadvertently not printing warnings since v1.16.0. This is now fixed. More details about these changes can be found on our GitHub repo. diff --git a/certbot/MANIFEST.in b/certbot/MANIFEST.in index abb8e854d..6214bfe95 100644 --- a/certbot/MANIFEST.in +++ b/certbot/MANIFEST.in @@ -4,7 +4,6 @@ include LICENSE.txt recursive-include docs * recursive-include examples * recursive-include certbot/tests/testdata * -recursive-include tests *.py include certbot/ssl-dhparams.pem include certbot/py.typed global-exclude __pycache__ diff --git a/certbot/certbot/__init__.py b/certbot/certbot/__init__.py index ac0583076..343efe7af 100644 --- a/certbot/certbot/__init__.py +++ b/certbot/certbot/__init__.py @@ -1,3 +1,3 @@ """Certbot client.""" # version number like 1.2.3a0, must have at least 2 parts, like 1.2 -__version__ = '2.5.0.dev0' +__version__ = '2.6.0.dev0' diff --git a/certbot/certbot/_internal/cli/cli_constants.py b/certbot/certbot/_internal/cli/cli_constants.py index cbf7b6a03..97bdd5691 100644 --- a/certbot/certbot/_internal/cli/cli_constants.py +++ b/certbot/certbot/_internal/cli/cli_constants.py @@ -93,4 +93,6 @@ DEPRECATED_OPTIONS = { "no_self_upgrade", "no_bootstrap", "no_permissions_check", + "dns_route53_propagation_seconds", + "certbot_route53:auth_propagation_seconds" } diff --git a/certbot/certbot/_internal/log.py b/certbot/certbot/_internal/log.py index 0aa33df6b..ab3384fc7 100644 --- a/certbot/certbot/_internal/log.py +++ b/certbot/certbot/_internal/log.py @@ -75,7 +75,10 @@ def pre_arg_parse_setup() -> None: stream_handler = ColoredStreamHandler() stream_handler.setFormatter(logging.Formatter(CLI_FMT)) - stream_handler.setLevel(constants.QUIET_LOGGING_LEVEL) + # The pre-argparse logging level is set to WARNING here. This is to ensure that + # deprecated flags (see DeprecatedArgumentAction) print something to the terminal. + # See https://github.com/certbot/certbot/issues/9618. + stream_handler.setLevel(logging.WARNING) root_logger = logging.getLogger() root_logger.setLevel(logging.DEBUG) # send all records to handlers diff --git a/certbot/certbot/_internal/renewal.py b/certbot/certbot/_internal/renewal.py index 39f704f2f..2b329dfd8 100644 --- a/certbot/certbot/_internal/renewal.py +++ b/certbot/certbot/_internal/renewal.py @@ -87,6 +87,14 @@ def reconstitute(config: configuration.NamespaceConfig, logger.error("Renewal configuration file %s does not specify " "an authenticator. Skipping.", full_path) return None + + # Prior to Certbot v1.25.0, the default value of key_type (rsa) was not persisted to the + # renewal params. If the option is absent, it means the certificate was an RSA key. + # Restoring the option here is necessary to preserve the certificate key_type if + # the user has upgraded directly from Certbot =v2.0.0, where the default + # key_type was changed to ECDSA. See https://github.com/certbot/certbot/issues/9635. + renewalparams["key_type"] = renewalparams.get("key_type", "rsa") + # Now restore specific values along with their data types, if # those elements are present. renewalparams = _remove_deprecated_config_elements(renewalparams) diff --git a/certbot/certbot/_internal/tests/__init__.py b/certbot/certbot/_internal/tests/__init__.py new file mode 100644 index 000000000..5b3aa04ab --- /dev/null +++ b/certbot/certbot/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot tests""" diff --git a/certbot/tests/account_test.py b/certbot/certbot/_internal/tests/account_test.py similarity index 100% rename from certbot/tests/account_test.py rename to certbot/certbot/_internal/tests/account_test.py diff --git a/certbot/tests/auth_handler_test.py b/certbot/certbot/_internal/tests/auth_handler_test.py similarity index 100% rename from certbot/tests/auth_handler_test.py rename to certbot/certbot/_internal/tests/auth_handler_test.py diff --git a/certbot/tests/cert_manager_test.py b/certbot/certbot/_internal/tests/cert_manager_test.py similarity index 99% rename from certbot/tests/cert_manager_test.py rename to certbot/certbot/_internal/tests/cert_manager_test.py index caacc520f..c8483efa7 100644 --- a/certbot/tests/cert_manager_test.py +++ b/certbot/certbot/_internal/tests/cert_manager_test.py @@ -14,11 +14,11 @@ import pytest from certbot import configuration from certbot import errors from certbot._internal.storage import ALL_FOUR +from certbot._internal.tests import storage_test from certbot.compat import filesystem from certbot.compat import os from certbot.display import util as display_util from certbot.tests import util as test_util -import storage_test class BaseCertManagerTest(test_util.ConfigTestCase): diff --git a/certbot/tests/cli_test.py b/certbot/certbot/_internal/tests/cli_test.py similarity index 100% rename from certbot/tests/cli_test.py rename to certbot/certbot/_internal/tests/cli_test.py diff --git a/certbot/tests/client_test.py b/certbot/certbot/_internal/tests/client_test.py similarity index 100% rename from certbot/tests/client_test.py rename to certbot/certbot/_internal/tests/client_test.py diff --git a/certbot/tests/compat/__init__.py b/certbot/certbot/_internal/tests/compat/__init__.py similarity index 100% rename from certbot/tests/compat/__init__.py rename to certbot/certbot/_internal/tests/compat/__init__.py diff --git a/certbot/tests/compat/filesystem_test.py b/certbot/certbot/_internal/tests/compat/filesystem_test.py similarity index 100% rename from certbot/tests/compat/filesystem_test.py rename to certbot/certbot/_internal/tests/compat/filesystem_test.py diff --git a/certbot/tests/compat/misc_test.py b/certbot/certbot/_internal/tests/compat/misc_test.py similarity index 100% rename from certbot/tests/compat/misc_test.py rename to certbot/certbot/_internal/tests/compat/misc_test.py diff --git a/certbot/tests/compat/os_test.py b/certbot/certbot/_internal/tests/compat/os_test.py similarity index 100% rename from certbot/tests/compat/os_test.py rename to certbot/certbot/_internal/tests/compat/os_test.py diff --git a/certbot/tests/configuration_test.py b/certbot/certbot/_internal/tests/configuration_test.py similarity index 100% rename from certbot/tests/configuration_test.py rename to certbot/certbot/_internal/tests/configuration_test.py diff --git a/certbot/tests/conftest.py b/certbot/certbot/_internal/tests/conftest.py similarity index 100% rename from certbot/tests/conftest.py rename to certbot/certbot/_internal/tests/conftest.py diff --git a/certbot/tests/crypto_util_test.py b/certbot/certbot/_internal/tests/crypto_util_test.py similarity index 100% rename from certbot/tests/crypto_util_test.py rename to certbot/certbot/_internal/tests/crypto_util_test.py diff --git a/certbot/tests/display/__init__.py b/certbot/certbot/_internal/tests/display/__init__.py similarity index 100% rename from certbot/tests/display/__init__.py rename to certbot/certbot/_internal/tests/display/__init__.py diff --git a/certbot/tests/display/completer_test.py b/certbot/certbot/_internal/tests/display/completer_test.py similarity index 100% rename from certbot/tests/display/completer_test.py rename to certbot/certbot/_internal/tests/display/completer_test.py diff --git a/certbot/tests/display/internal_util_test.py b/certbot/certbot/_internal/tests/display/internal_util_test.py similarity index 100% rename from certbot/tests/display/internal_util_test.py rename to certbot/certbot/_internal/tests/display/internal_util_test.py diff --git a/certbot/tests/display/obj_test.py b/certbot/certbot/_internal/tests/display/obj_test.py similarity index 100% rename from certbot/tests/display/obj_test.py rename to certbot/certbot/_internal/tests/display/obj_test.py diff --git a/certbot/tests/display/ops_test.py b/certbot/certbot/_internal/tests/display/ops_test.py similarity index 100% rename from certbot/tests/display/ops_test.py rename to certbot/certbot/_internal/tests/display/ops_test.py diff --git a/certbot/tests/display/util_test.py b/certbot/certbot/_internal/tests/display/util_test.py similarity index 100% rename from certbot/tests/display/util_test.py rename to certbot/certbot/_internal/tests/display/util_test.py diff --git a/certbot/tests/eff_test.py b/certbot/certbot/_internal/tests/eff_test.py similarity index 100% rename from certbot/tests/eff_test.py rename to certbot/certbot/_internal/tests/eff_test.py diff --git a/certbot/tests/error_handler_test.py b/certbot/certbot/_internal/tests/error_handler_test.py similarity index 100% rename from certbot/tests/error_handler_test.py rename to certbot/certbot/_internal/tests/error_handler_test.py diff --git a/certbot/tests/errors_test.py b/certbot/certbot/_internal/tests/errors_test.py similarity index 100% rename from certbot/tests/errors_test.py rename to certbot/certbot/_internal/tests/errors_test.py diff --git a/certbot/tests/helpful_test.py b/certbot/certbot/_internal/tests/helpful_test.py similarity index 100% rename from certbot/tests/helpful_test.py rename to certbot/certbot/_internal/tests/helpful_test.py diff --git a/certbot/tests/hook_test.py b/certbot/certbot/_internal/tests/hook_test.py similarity index 100% rename from certbot/tests/hook_test.py rename to certbot/certbot/_internal/tests/hook_test.py diff --git a/certbot/tests/lock_test.py b/certbot/certbot/_internal/tests/lock_test.py similarity index 100% rename from certbot/tests/lock_test.py rename to certbot/certbot/_internal/tests/lock_test.py diff --git a/certbot/tests/log_test.py b/certbot/certbot/_internal/tests/log_test.py similarity index 100% rename from certbot/tests/log_test.py rename to certbot/certbot/_internal/tests/log_test.py diff --git a/certbot/tests/main_test.py b/certbot/certbot/_internal/tests/main_test.py similarity index 99% rename from certbot/tests/main_test.py rename to certbot/certbot/_internal/tests/main_test.py index 6220ce537..8dd4deba1 100644 --- a/certbot/tests/main_test.py +++ b/certbot/certbot/_internal/tests/main_test.py @@ -1472,13 +1472,13 @@ class MainTest(test_util.ConfigTestCase): self._test_renewal_common(True, [], args=args, should_renew=True) def test_reuse_key(self): - test_util.make_lineage(self.config.config_dir, 'sample-renewal.conf') + test_util.make_lineage(self.config.config_dir, 'sample-renewal.conf', ec=False) args = ["renew", "--dry-run", "--reuse-key"] self._test_renewal_common(True, [], args=args, should_renew=True, reuse_key=True) @mock.patch('certbot._internal.storage.RenewableCert.save_successor') def test_reuse_key_no_dry_run(self, unused_save_successor): - test_util.make_lineage(self.config.config_dir, 'sample-renewal.conf') + test_util.make_lineage(self.config.config_dir, 'sample-renewal.conf', ec=False) args = ["renew", "--reuse-key"] self._test_renewal_common(True, [], args=args, should_renew=True, reuse_key=True) diff --git a/certbot/tests/ocsp_test.py b/certbot/certbot/_internal/tests/ocsp_test.py similarity index 100% rename from certbot/tests/ocsp_test.py rename to certbot/certbot/_internal/tests/ocsp_test.py diff --git a/certbot/tests/plugins/__init__.py b/certbot/certbot/_internal/tests/plugins/__init__.py similarity index 100% rename from certbot/tests/plugins/__init__.py rename to certbot/certbot/_internal/tests/plugins/__init__.py diff --git a/certbot/tests/plugins/common_test.py b/certbot/certbot/_internal/tests/plugins/common_test.py similarity index 99% rename from certbot/tests/plugins/common_test.py rename to certbot/certbot/_internal/tests/plugins/common_test.py index 4a0af7c5e..8c5b26031 100644 --- a/certbot/tests/plugins/common_test.py +++ b/certbot/certbot/_internal/tests/plugins/common_test.py @@ -9,6 +9,7 @@ import josepy as jose import pytest from acme import challenges +from acme import messages from certbot import achallenges from certbot import crypto_util from certbot import errors @@ -20,7 +21,7 @@ from certbot.tests import util as test_util AUTH_KEY = jose.JWKRSA.load(test_util.load_vector("rsa512_key.pem")) ACHALL = achallenges.KeyAuthorizationAnnotatedChallenge( challb=acme_util.chall_to_challb(challenges.HTTP01(token=b'token1'), - "pending"), + messages.STATUS_PENDING), domain="encryption-example.demo", account_key=AUTH_KEY) @@ -51,7 +52,7 @@ class PluginTest(unittest.TestCase): pass def more_info(self) -> str: - pass + return "info" @classmethod def add_parser_arguments(cls, add): diff --git a/certbot/tests/plugins/disco_test.py b/certbot/certbot/_internal/tests/plugins/disco_test.py similarity index 100% rename from certbot/tests/plugins/disco_test.py rename to certbot/certbot/_internal/tests/plugins/disco_test.py diff --git a/certbot/tests/plugins/dns_common_lexicon_test.py b/certbot/certbot/_internal/tests/plugins/dns_common_lexicon_test.py similarity index 100% rename from certbot/tests/plugins/dns_common_lexicon_test.py rename to certbot/certbot/_internal/tests/plugins/dns_common_lexicon_test.py diff --git a/certbot/tests/plugins/dns_common_test.py b/certbot/certbot/_internal/tests/plugins/dns_common_test.py similarity index 100% rename from certbot/tests/plugins/dns_common_test.py rename to certbot/certbot/_internal/tests/plugins/dns_common_test.py diff --git a/certbot/tests/plugins/enhancements_test.py b/certbot/certbot/_internal/tests/plugins/enhancements_test.py similarity index 100% rename from certbot/tests/plugins/enhancements_test.py rename to certbot/certbot/_internal/tests/plugins/enhancements_test.py diff --git a/certbot/tests/plugins/manual_test.py b/certbot/certbot/_internal/tests/plugins/manual_test.py similarity index 100% rename from certbot/tests/plugins/manual_test.py rename to certbot/certbot/_internal/tests/plugins/manual_test.py diff --git a/certbot/tests/plugins/null_test.py b/certbot/certbot/_internal/tests/plugins/null_test.py similarity index 100% rename from certbot/tests/plugins/null_test.py rename to certbot/certbot/_internal/tests/plugins/null_test.py diff --git a/certbot/tests/plugins/selection_test.py b/certbot/certbot/_internal/tests/plugins/selection_test.py similarity index 100% rename from certbot/tests/plugins/selection_test.py rename to certbot/certbot/_internal/tests/plugins/selection_test.py diff --git a/certbot/tests/plugins/standalone_test.py b/certbot/certbot/_internal/tests/plugins/standalone_test.py similarity index 100% rename from certbot/tests/plugins/standalone_test.py rename to certbot/certbot/_internal/tests/plugins/standalone_test.py diff --git a/certbot/tests/plugins/storage_test.py b/certbot/certbot/_internal/tests/plugins/storage_test.py similarity index 100% rename from certbot/tests/plugins/storage_test.py rename to certbot/certbot/_internal/tests/plugins/storage_test.py diff --git a/certbot/tests/plugins/util_test.py b/certbot/certbot/_internal/tests/plugins/util_test.py similarity index 100% rename from certbot/tests/plugins/util_test.py rename to certbot/certbot/_internal/tests/plugins/util_test.py diff --git a/certbot/tests/plugins/webroot_test.py b/certbot/certbot/_internal/tests/plugins/webroot_test.py similarity index 100% rename from certbot/tests/plugins/webroot_test.py rename to certbot/certbot/_internal/tests/plugins/webroot_test.py diff --git a/certbot/tests/renewal_test.py b/certbot/certbot/_internal/tests/renewal_test.py similarity index 96% rename from certbot/tests/renewal_test.py rename to certbot/certbot/_internal/tests/renewal_test.py index 0bb915345..f11b01603 100644 --- a/certbot/tests/renewal_test.py +++ b/certbot/certbot/_internal/tests/renewal_test.py @@ -177,6 +177,17 @@ class RenewalTest(test_util.ConfigTestCase): # value in the renewal conf file assert isinstance(lineage_config.manual_public_ip_logging_ok, mock.MagicMock) + @mock.patch('certbot._internal.renewal.cli.set_by_cli') + def test_absent_key_type_restored(self, mock_set_by_cli): + mock_set_by_cli.return_value = False + + rc_path = test_util.make_lineage(self.config.config_dir, 'sample-renewal.conf', ec=False) + + from certbot._internal import renewal + lineage_config = copy.deepcopy(self.config) + renewal.reconstitute(lineage_config, rc_path) + assert lineage_config.key_type == 'rsa' + class RestoreRequiredConfigElementsTest(test_util.ConfigTestCase): """Tests for certbot._internal.renewal.restore_required_config_elements.""" diff --git a/certbot/tests/renewupdater_test.py b/certbot/certbot/_internal/tests/renewupdater_test.py similarity index 100% rename from certbot/tests/renewupdater_test.py rename to certbot/certbot/_internal/tests/renewupdater_test.py diff --git a/certbot/tests/reverter_test.py b/certbot/certbot/_internal/tests/reverter_test.py similarity index 100% rename from certbot/tests/reverter_test.py rename to certbot/certbot/_internal/tests/reverter_test.py diff --git a/certbot/tests/storage_test.py b/certbot/certbot/_internal/tests/storage_test.py similarity index 100% rename from certbot/tests/storage_test.py rename to certbot/certbot/_internal/tests/storage_test.py diff --git a/certbot/tests/util_test.py b/certbot/certbot/_internal/tests/util_test.py similarity index 98% rename from certbot/tests/util_test.py rename to certbot/certbot/_internal/tests/util_test.py index 9377ed6b7..b4256176e 100644 --- a/certbot/tests/util_test.py +++ b/certbot/certbot/_internal/tests/util_test.py @@ -247,13 +247,6 @@ class UniqueFileTest(test_util.TempDirTestCase): fd3.close() -try: - file_type = file -except NameError: - import io - file_type = io.TextIOWrapper # type: ignore - - class UniqueLineageNameTest(test_util.TempDirTestCase): """Tests for certbot.util.unique_lineage_name.""" @@ -263,7 +256,7 @@ class UniqueLineageNameTest(test_util.TempDirTestCase): def test_basic(self): f, path = self._call("wow") - assert isinstance(f, file_type) + assert isinstance(f, io.TextIOWrapper) assert os.path.join(self.tempdir, "wow.conf") == path f.close() @@ -272,7 +265,7 @@ class UniqueLineageNameTest(test_util.TempDirTestCase): for _ in range(10): items.append(self._call("wow")) f, name = items[-1] - assert isinstance(f, file_type) + assert isinstance(f, io.TextIOWrapper) assert isinstance(name, str) assert "wow-0009.conf" in name for f, _ in items: @@ -351,19 +344,19 @@ class AddDeprecatedArgumentTest(unittest.TestCase): def test_warning_no_arg(self): self._call("--old-option", 0) - with mock.patch("warnings.warn") as mock_warn: + with mock.patch("certbot.util.logger.warning") as mock_warn: self.parser.parse_args(["--old-option"]) assert mock_warn.call_count == 1 assert "is deprecated" in mock_warn.call_args[0][0] - assert "--old-option" in mock_warn.call_args[0][0] + assert "--old-option" in mock_warn.call_args[0][1] def test_warning_with_arg(self): self._call("--old-option", 1) - with mock.patch("warnings.warn") as mock_warn: + with mock.patch("certbot.util.logger.warning") as mock_warn: self.parser.parse_args(["--old-option", "42"]) assert mock_warn.call_count == 1 assert "is deprecated" in mock_warn.call_args[0][0] - assert "--old-option" in mock_warn.call_args[0][0] + assert "--old-option" in mock_warn.call_args[0][1] def test_help(self): self._call("--old-option", 2) diff --git a/certbot/certbot/util.py b/certbot/certbot/util.py index 12427aa92..a477e972d 100644 --- a/certbot/certbot/util.py +++ b/certbot/certbot/util.py @@ -18,7 +18,6 @@ from typing import Optional from typing import Set from typing import Tuple from typing import Union -import warnings import configargparse @@ -455,7 +454,7 @@ class DeprecatedArgumentAction(argparse.Action): """Action to log a warning when an argument is used.""" def __call__(self, unused1: Any, unused2: Any, unused3: Any, option_string: Optional[str] = None) -> None: - warnings.warn("Use of %s is deprecated." % option_string, DeprecationWarning) + logger.warning("Use of %s is deprecated.", option_string) def add_deprecated_argument(add_argument: Callable[..., None], argument_name: str, diff --git a/certbot/docs/cli-help.txt b/certbot/docs/cli-help.txt index 5f8cf40b3..c1d954b05 100644 --- a/certbot/docs/cli-help.txt +++ b/certbot/docs/cli-help.txt @@ -36,7 +36,7 @@ manage your account: --agree-tos Agree to the ACME server's Subscriber Agreement -m EMAIL Email address for important account notifications -options: +optional arguments: -h, --help show this help message and exit -c CONFIG_FILE, --config CONFIG_FILE path to config file (default: /etc/letsencrypt/cli.ini @@ -124,7 +124,7 @@ options: case, and to know when to deprecate support for past Python versions and flags. If you wish to hide this information from the Let's Encrypt server, set this to - "". (default: CertbotACMEClient/2.4.0 (certbot; + "". (default: CertbotACMEClient/2.5.0 (certbot; OS_NAME OS_VERSION) Authenticator/XXX Installer/YYY (SUBCOMMAND; flags: FLAGS) Py/major.minor.patchlevel). The flags encoded in the user agent are: --duplicate, @@ -319,25 +319,34 @@ renew: more information on these. --pre-hook PRE_HOOK Command to be run in a shell before obtaining any - certificates. Intended primarily for renewal, where it - can be used to temporarily shut down a webserver that - might conflict with the standalone plugin. This will - only be called if a certificate is actually to be - obtained/renewed. When renewing several certificates - that have identical pre-hooks, only the first will be - executed. (default: None) + certificates. Unless --disable-hook-validation is + used, the command’s first word must be the absolute + pathname of an executable or one found via the PATH + environment variable. Intended primarily for renewal, + where it can be used to temporarily shut down a + webserver that might conflict with the standalone + plugin. This will only be called if a certificate is + actually to be obtained/renewed. When renewing several + certificates that have identical pre-hooks, only the + first will be executed. (default: None) --post-hook POST_HOOK Command to be run in a shell after attempting to - obtain/renew certificates. Can be used to deploy - renewed certificates, or to restart any servers that - were stopped by --pre-hook. This is only run if an - attempt was made to obtain/renew a certificate. If + obtain/renew certificates. Unless --disable-hook- + validation is used, the command’s first word must be + the absolute pathname of an executable or one found + via the PATH environment variable. Can be used to + deploy renewed certificates, or to restart any servers + that were stopped by --pre-hook. This is only run if + an attempt was made to obtain/renew a certificate. If multiple renewed certificates have identical post- hooks, only one will be run. (default: None) --deploy-hook DEPLOY_HOOK Command to be run in a shell once for each - successfully issued certificate. For this command, the - shell variable $RENEWED_LINEAGE will point to the + successfully issued certificate. Unless --disable- + hook-validation is used, the command’s first word must + be the absolute pathname of an executable or one found + via the PATH environment variable. For this command, + the shell variable $RENEWED_LINEAGE will point to the config live subdirectory (for example, "/etc/letsencrypt/live/example.com") containing the new certificates and keys; the shell variable @@ -659,11 +668,6 @@ dns-route53: Obtain certificates using a DNS TXT record (if you are using AWS Route53 for DNS). - --dns-route53-propagation-seconds DNS_ROUTE53_PROPAGATION_SECONDS - The number of seconds to wait for DNS to propagate - before asking the ACME server to verify the DNS - record. (default: 10) - dns-sakuracloud: Obtain certificates using a DNS TXT record (if you are using Sakura Cloud for DNS). diff --git a/certbot/docs/contributing.rst b/certbot/docs/contributing.rst index f86bed01a..d16884da2 100644 --- a/certbot/docs/contributing.rst +++ b/certbot/docs/contributing.rst @@ -585,27 +585,20 @@ include our snaps, Docker images, Windows installer, CI, and our development environments. In most cases, the file where dependency versions are specified is -``tools/requirements.txt``. There are two exceptions to this. The first is our -"oldest" tests where ``tools/oldest_constraints.txt`` is used instead. The -purpose of the "oldest" tests is to ensure Certbot continues to work with the -oldest versions of our dependencies which we claim to support. The oldest -versions of the dependencies we support should also be declared in our setup.py -files to communicate this information to our users. - -The second exception to using ``tools/requirements.txt`` is in our unpinned -tests. As of writing this, there is one test we run nightly in CI where we -leave Certbot's dependencies unpinned. The thinking behind this test is to help -us learn about breaking changes in our dependencies so that we can respond -accordingly. +``tools/requirements.txt``. The one exception to this is our "oldest" tests +where ``tools/oldest_constraints.txt`` is used instead. The purpose of the +"oldest" tests is to ensure Certbot continues to work with the oldest versions +of our dependencies which we claim to support. The oldest versions of the +dependencies we support should also be declared in our setup.py files to +communicate this information to our users. The choices of whether Certbot's dependencies are pinned and what file is used if they are should be automatically handled for you most of the time by Certbot's tooling. The way it works though is ``tools/pip_install.py`` (which many of our other tools build on) checks for the presence of environment -variables. If ``CERTBOT_NO_PIN`` is set to 1, Certbot's dependencies will not -be pinned. If that variable is not set and ``CERTBOT_OLDEST`` is set to 1, -``tools/oldest_constraints.txt`` will be used as constraints for ``pip``. -Otherwise, ``tools/requirements.txt`` is used as constraints. +variables. If ``CERTBOT_OLDEST`` is set to 1, ``tools/oldest_constraints.txt`` +will be used as constraints for ``pip``, otherwise, ``tools/requirements.txt`` +is used as constraints. Updating dependency versions ---------------------------- diff --git a/certbot/setup.py b/certbot/setup.py index fddc7c026..0ab157d94 100644 --- a/certbot/setup.py +++ b/certbot/setup.py @@ -50,7 +50,7 @@ install_requires = [ # in which we added 2.6 support (see #2243), so we relax the requirement. 'ConfigArgParse>=0.9.3', 'configobj>=5.0.6', - 'cryptography>=2.5.0', + 'cryptography>=3.2.1', 'distro>=1.0.1', 'josepy>=1.13.0', 'parsedatetime>=2.4', diff --git a/mypy.ini b/mypy.ini index c776dc9a6..2c9ba5187 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3,3 +3,12 @@ ignore_missing_imports = True warn_unused_ignores = True show_error_codes = True disallow_untyped_defs = True + +# Using stricter settings here is being tracked by +# https://github.com/certbot/certbot/issues/9647. +[mypy-*._internal.tests.*] +# By default, mypy prints notes without erroring about any type annotations it +# finds in untyped function bodies when check_untyped_defs is false. Disabling +# this "error" code removes this visual noise. +disable_error_code = annotation-unchecked +disallow_untyped_defs = False diff --git a/tools/_release.sh b/tools/_release.sh index 58551952c..766d753b1 100755 --- a/tools/_release.sh +++ b/tools/_release.sh @@ -76,14 +76,8 @@ git tag --delete "$tag" || true tmpvenv=$(mktemp -d) python3 -m venv "$tmpvenv" . $tmpvenv/bin/activate -# update setuptools/pip just like in other places in the repo -pip install -U setuptools -pip install -U pip # latest pip => no --pre for dev releases -pip install -U wheel # setup.py bdist_wheel - -# newer versions of virtualenv inherit setuptools/pip/wheel versions -# from current env when creating a child env -pip install -U virtualenv +# update packaging tools to their pinned versions +tools/pip_install.py virtualenv root_without_le="$version.$$" root="$RELEASE_DIR/le.$root_without_le" diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 4c9a74bee..7465a5a13 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -34,7 +34,6 @@ RUN apk add --no-cache --virtual .build-deps \ python3-dev \ cargo \ git \ - && python tools/pipstrap.py \ && python tools/pip_install.py --no-cache-dir \ --editable src/acme \ --editable src/certbot \ diff --git a/tools/install_and_test.py b/tools/install_and_test.py index 37864397e..439e5dce3 100755 --- a/tools/install_and_test.py +++ b/tools/install_and_test.py @@ -1,10 +1,9 @@ #!/usr/bin/env python # 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 -# before the script moves on to the next package. If CERTBOT_NO_PIN is set not -# set to 1, packages are installed using pinned versions of all of our -# dependencies. See pip_install.py for more information on the versions pinned -# to. +# before the script moves on to the next package. Packages are installed using +# pinned versions of all of our dependencies. See pip_install.py for more +# information on the versions pinned to. import os import re import subprocess diff --git a/tools/pip_install.py b/tools/pip_install.py index 6cd7af680..03c771438 100755 --- a/tools/pip_install.py +++ b/tools/pip_install.py @@ -1,7 +1,14 @@ #!/usr/bin/env python # pip installs packages using pinned package versions. If CERTBOT_OLDEST is set # to 1, tools/oldest_constraints.txt is used, otherwise, tools/requirements.txt -# is used. +# is used. Before installing the requested packages, core Python packaging +# tools like pip, setuptools, and wheel are updated to pinned versions to +# increase stability of the install. +# +# cryptography is currently using this script in their CI at +# https://github.com/pyca/cryptography/blob/14d45c2259b01f1459eeab8bb7d85ce4cfb0841b/.github/downstream.d/certbot.sh#L8-L9. +# We should try to remember to keep their repo updated if we make any changes +# to this script which may break things for them. from __future__ import absolute_import from __future__ import print_function @@ -9,51 +16,52 @@ from __future__ import print_function import os import subprocess import sys -import tempfile - -import readlink def find_tools_path(): - return os.path.dirname(readlink.main(__file__)) + return os.path.dirname(os.path.realpath(__file__)) -def call_with_print(command, env=None): - if not env: - env = os.environ +def call_with_print(command, env): + assert env is not None print(command) subprocess.check_call(command, shell=True, env=env) -def pip_install_with_print(args_str, env=None): - if not env: - env = os.environ +def pip_install_with_print(args_str, env): command = ['"', sys.executable, '" -m pip install --disable-pip-version-check ', args_str] call_with_print(''.join(command), env=env) -def main(args): +def pip_constrained_environ(): tools_path = find_tools_path() - with tempfile.TemporaryDirectory() as working_dir: - if os.environ.get('CERTBOT_NO_PIN') == '1': - # With unpinned dependencies, there is no constraint - pip_install_with_print(' '.join(args)) - else: - # Otherwise, we pick the constraints file based on the environment - # variable CERTBOT_OLDEST. - repo_path = os.path.dirname(tools_path) - if os.environ.get('CERTBOT_OLDEST') == '1': - constraints_path = os.path.normpath(os.path.join( - repo_path, 'tools', 'oldest_constraints.txt')) - else: - constraints_path = os.path.normpath(os.path.join( - repo_path, 'tools', 'requirements.txt')) + repo_path = os.path.dirname(tools_path) + if os.environ.get('CERTBOT_OLDEST') == '1': + constraints_path = os.path.normpath(os.path.join( + repo_path, 'tools', 'oldest_constraints.txt')) + else: + constraints_path = os.path.normpath(os.path.join( + repo_path, 'tools', 'requirements.txt')) - env = os.environ.copy() - env["PIP_CONSTRAINT"] = constraints_path + env = os.environ.copy() + # We set constraints for pip using an environment variable so that they + # are also used when installing build dependencies. See + # https://github.com/certbot/certbot/pull/8443 for more info. + env["PIP_CONSTRAINT"] = constraints_path + return env - pip_install_with_print(' '.join(args), env=env) + +def pipstrap(env=None): + if env is None: + env = pip_constrained_environ() + pip_install_with_print('pip setuptools wheel', env=env) + + +def main(args): + env = pip_constrained_environ() + pipstrap(env) + pip_install_with_print(' '.join(args), env=env) if __name__ == '__main__': diff --git a/tools/pip_install_editable.py b/tools/pip_install_editable.py index dd1416e75..87be1b8f5 100755 --- a/tools/pip_install_editable.py +++ b/tools/pip_install_editable.py @@ -1,10 +1,5 @@ #!/usr/bin/env python # pip installs packages in editable mode using pip_install.py -# -# cryptography is currently using this script in their CI at -# https://github.com/pyca/cryptography/blob/a02fdd60d98273ca34427235c4ca96687a12b239/.travis/downstream.d/certbot.sh#L8-L9. -# We should try to remember to keep their repo updated if we make any changes -# to this script which may break things for them. import sys import pip_install diff --git a/tools/pipstrap.py b/tools/pipstrap.py index d2dbfaba9..d74c50edd 100755 --- a/tools/pipstrap.py +++ b/tools/pipstrap.py @@ -4,7 +4,7 @@ import pip_install def main(): - pip_install.main('pip setuptools wheel'.split()) + pip_install.pipstrap() if __name__ == '__main__': diff --git a/tools/readlink.py b/tools/readlink.py deleted file mode 100755 index c1e0c2e61..000000000 --- a/tools/readlink.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -"""Canonicalizes a path and follows any symlinks. - -This is the equivalent of `readlink -f` on many Linux systems. This is -useful as there are often differences in readlink on different -platforms. - -""" -import os -import sys - - -def main(link): - return os.path.realpath(link) - -if __name__ == '__main__': - print(main(sys.argv[1])) diff --git a/tools/venv.py b/tools/venv.py index 0721b2b25..244a13798 100755 --- a/tools/venv.py +++ b/tools/venv.py @@ -197,7 +197,6 @@ def install_packages(venv_name, pip_args): """ # Using the python executable from venv, we ensure to execute following commands in this venv. py_venv = get_venv_python_path(venv_name) - subprocess_with_print([py_venv, os.path.abspath('tools/pipstrap.py')]) command = [py_venv, os.path.abspath('tools/pip_install.py')] command.extend(pip_args) subprocess_with_print(command) diff --git a/tox.ini b/tox.ini index 7cb5be517..de98c3e25 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,9 @@ [tox] skipsdist = true -envlist = {cover,lint,mypy}-{win,posix} +# mypy doesn't current pass for us on Windows. Fixing that is being tracked by +# https://github.com/certbot/certbot/issues/7803. +envlist = {cover,lint}-{win,posix},mypy-posix [base] # pip installs the requested packages in editable mode @@ -23,12 +25,9 @@ all_packages = {[base]win_all_packages} certbot-apache source_paths = acme/acme certbot/certbot certbot-apache/certbot_apache certbot-ci/certbot_integration_tests certbot-ci/snap_integration_tests certbot-ci/windows_installer_integration_tests certbot-compatibility-test/certbot_compatibility_test certbot-dns-cloudflare/certbot_dns_cloudflare certbot-dns-digitalocean/certbot_dns_digitalocean certbot-dns-dnsimple/certbot_dns_dnsimple certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy certbot-dns-gehirn/certbot_dns_gehirn certbot-dns-google/certbot_dns_google certbot-dns-linode/certbot_dns_linode certbot-dns-luadns/certbot_dns_luadns certbot-dns-nsone/certbot_dns_nsone certbot-dns-ovh/certbot_dns_ovh certbot-dns-rfc2136/certbot_dns_rfc2136 certbot-dns-route53/certbot_dns_route53 certbot-dns-sakuracloud/certbot_dns_sakuracloud certbot-nginx/certbot_nginx [testenv] -passenv = - CERTBOT_NO_PIN platform = win: win32 posix: ^(?!.*win32).*$ -commands_pre = python {toxinidir}/tools/pipstrap.py commands = win: {[base]install_and_test} {[base]win_all_packages} !win: {[base]install_and_test} {[base]all_packages} @@ -132,7 +131,7 @@ commands = [testenv:apacheconftest] commands = {[base]pip_install} acme certbot certbot-apache - {toxinidir}/certbot-apache/tests/apache-conf-files/apache-conf-test --debian-modules + {toxinidir}/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test --debian-modules passenv = SERVER @@ -141,7 +140,7 @@ passenv = # environment. commands = {[base]pip_install} certbot-ci - {toxinidir}/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py --debian-modules + {toxinidir}/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py --debian-modules [testenv:apacheconftest-with-pebble] commands =