From 6a666b032392a5c72b6ce723b03985691e8a6563 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Thu, 23 Mar 2023 10:04:14 -0700 Subject: [PATCH 01/23] increase stale frequency --- .github/workflows/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: From a16f316b8fe32366543dc4abb8e043dc1ba7a537 Mon Sep 17 00:00:00 2001 From: alexzorin Date: Tue, 28 Mar 2023 05:12:18 +1100 Subject: [PATCH 02/23] logging: increase pre-argparse logging level to WARNING (#9629) --- certbot/certbot/_internal/log.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 From fbf7f1f4d17a528330d8a1de7da390515c8741ea Mon Sep 17 00:00:00 2001 From: alexzorin Date: Tue, 28 Mar 2023 05:13:16 +1100 Subject: [PATCH 03/23] logging: use logger.warning for DeprecatedArgumentAction (#9630) --- certbot/CHANGELOG.md | 2 +- certbot/certbot/util.py | 3 +-- certbot/tests/util_test.py | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index 3886642d8..3348369f3 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -21,7 +21,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). ### Fixed -* +* 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/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/tests/util_test.py b/certbot/tests/util_test.py index 9377ed6b7..ac3b5ab88 100644 --- a/certbot/tests/util_test.py +++ b/certbot/tests/util_test.py @@ -351,19 +351,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) From f004383582d5c0b3b21f95fed40f20cdf808a9d2 Mon Sep 17 00:00:00 2001 From: alexzorin Date: Tue, 28 Mar 2023 05:27:48 +1100 Subject: [PATCH 04/23] avoid pyOpenSSL 23.1.0 (#9631) Our `NO_PIN` test [fails](https://dev.azure.com/certbot/certbot/_build/results?buildId=6542&view=logs&j=ce03f7c1-1e3f-5d55-28be-f084e7c62a50&t=597fea95-d44e-53a2-5b71-76ed20bd4dde) due to https://github.com/pyca/pyopenssl/issues/1199. This PR might strictly not be necessary once a new release of `PyOpenSSL` is available? I suppose it depends whether they yank the release. --- acme/setup.py | 3 ++- certbot-nginx/setup.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/acme/setup.py b/acme/setup.py index 9ee91676e..26ff4b7d7 100644 --- a/acme/setup.py +++ b/acme/setup.py @@ -8,7 +8,8 @@ version = '2.5.0.dev0' install_requires = [ 'cryptography>=2.5.0', '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-nginx/setup.py b/certbot-nginx/setup.py index f349e9388..6a0da5b74 100644 --- a/certbot-nginx/setup.py +++ b/certbot-nginx/setup.py @@ -9,7 +9,8 @@ install_requires = [ # https://github.com/certbot/certbot/issues/8761 for more info. f'acme>={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', ] From 208ef4eb942c7129dd265632de740ed1fab53c98 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 27 Mar 2023 17:01:27 -0700 Subject: [PATCH 05/23] remove CERTBOT_NO_PIN (#9634) Adrien and I added this is in https://github.com/certbot/certbot/pull/6590 in response to https://github.com/certbot/certbot/issues/6582 which I wrote. I now personally think these tests are way more trouble than they're worth. In almost all cases, the versions pinned in `tools/requirements.txt` are used. The two exceptions to this that come to mind are users using OS packages and pip. In the former, the version of our dependencies is picked by the OS and do not change much on most systems. As for pip, [we only "support it on a best effort basis"](https://eff-certbot.readthedocs.io/en/stable/install.html#alternative-2-pip). Even for pip users, I'm not convinced this buys us much other than frequent test failures. We have our tests configured to error on all Python warnings and [we regularly update `tools/requirements.txt`](https://github.com/certbot/certbot/commits/master/tools/requirements.txt). Due to that, assuming our dependencies follow normal conventions, we should have a chance to fix things in response to planned API changes long before they make their way to our users. I do not think it is necessary for our tests to break immediately after an API is deprecated. I think almost all other failures due to these tests are caused by upstream bugs. In my experience, almost all of them will sort themselves out pretty quickly. I think that responding to those that are not or planned API changes we somehow missed can be addressed when `tools/requirements.txt` is updated or when someone opens an issue. I personally don't think blocking releases or causing our nightly tests to fail is at all worth it here. I think removing this frequent cause of test failures makes things just a little bit easier for Certbot devs without costing us much of anything. --- .../templates/jobs/extended-tests-jobs.yml | 4 --- .../templates/steps/tox-steps.yml | 9 +------ certbot/docs/contributing.rst | 25 +++++++------------ tools/install_and_test.py | 7 +++--- tools/pip_install.py | 24 +++++++----------- tox.ini | 2 -- 6 files changed, 22 insertions(+), 49 deletions(-) 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/steps/tox-steps.yml b/.azure-pipelines/templates/steps/tox-steps.yml index 5557bac68..b7027177b 100644 --- a/.azure-pipelines/templates/steps/tox-steps.yml +++ b/.azure-pipelines/templates/steps/tox-steps.yml @@ -28,17 +28,10 @@ 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/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/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..c46fa8758 100755 --- a/tools/pip_install.py +++ b/tools/pip_install.py @@ -36,24 +36,18 @@ def main(args): 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)) + 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: - # 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')) + 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() + env["PIP_CONSTRAINT"] = constraints_path - pip_install_with_print(' '.join(args), env=env) + pip_install_with_print(' '.join(args), env=env) if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index 7cb5be517..3652205b1 100644 --- a/tox.ini +++ b/tox.ini @@ -23,8 +23,6 @@ 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).*$ From e10e549a95a3a3ca9af66f3eeb1ae5e1797546d5 Mon Sep 17 00:00:00 2001 From: alexzorin Date: Wed, 29 Mar 2023 02:44:19 +1100 Subject: [PATCH 06/23] renewal: fix key_type not being preserved on 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 =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/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/tests/main_test.py b/certbot/tests/main_test.py index 6220ce537..8dd4deba1 100644 --- a/certbot/tests/main_test.py +++ b/certbot/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/renewal_test.py b/certbot/tests/renewal_test.py index 0bb915345..f11b01603 100644 --- a/certbot/tests/renewal_test.py +++ b/certbot/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.""" From 6832521272126f61038fcacbf84eeb7eff46cc5f Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 28 Mar 2023 14:02:33 -0700 Subject: [PATCH 07/23] Make acme tests internal (#9625) This is a first step towards implementing the plan I described at https://github.com/certbot/certbot/issues/7909#issuecomment-1448675456 which got a +1 from both Erica and Will. Similar changes for our other packages will be made in followup PRs to try and make this easier to review. It may be helpful to look at https://github.com/certbot/certbot/pull/7600 when reviewing this PR where we did something similar in the past. The value of `ignore-paths` in `.pylintrc` should work on Windows based on https://pylint.readthedocs.io/en/latest/user_guide/configuration/all-options.html#ignore-paths and the fact that on macOS/linux, changing path delimiters to `\` still causes these directories to be ignored. I started testing this for mypy as well, but mypy doesn't current pass for us on Windows so I didn't bother and took this opportunity to remove it from the default environments in `tox.ini`. I'll update https://github.com/certbot/certbot/issues/7803 to mention that the value of `exclude` in `mypy.ini` may need to be tweaked if anyone works on that issue. * make acme tests internal * no mypy-win --- .pylintrc | 5 ++++- acme/MANIFEST.in | 2 +- acme/acme/_internal/__init__.py | 1 + acme/acme/_internal/tests/__init__.py | 1 + acme/{ => acme/_internal}/tests/challenges_test.py | 2 +- acme/{ => acme/_internal}/tests/client_test.py | 4 ++-- acme/{ => acme/_internal}/tests/crypto_util_test.py | 2 +- acme/{ => acme/_internal}/tests/errors_test.py | 0 acme/{ => acme/_internal}/tests/fields_test.py | 0 acme/{ => acme/_internal}/tests/jose_test.py | 0 acme/{ => acme/_internal}/tests/jws_test.py | 2 +- acme/{ => acme/_internal}/tests/messages_test.py | 2 +- acme/{ => acme/_internal}/tests/standalone_test.py | 2 +- acme/{ => acme/_internal}/tests/test_util.py | 0 acme/{ => acme/_internal}/tests/testdata/README | 0 .../_internal}/tests/testdata/cert-100sans.pem | 0 .../_internal}/tests/testdata/cert-idnsans.pem | 0 .../_internal}/tests/testdata/cert-ipsans.pem | 0 .../_internal}/tests/testdata/cert-ipv6sans.pem | 0 .../_internal}/tests/testdata/cert-nocn.der | Bin .../_internal}/tests/testdata/cert-san.pem | 0 acme/{ => acme/_internal}/tests/testdata/cert.der | Bin acme/{ => acme/_internal}/tests/testdata/cert.pem | 0 .../_internal}/tests/testdata/critical-san.pem | 0 .../_internal}/tests/testdata/csr-100sans.pem | 0 .../_internal}/tests/testdata/csr-6sans.pem | 0 .../_internal}/tests/testdata/csr-idnsans.pem | 0 .../_internal}/tests/testdata/csr-ipsans.pem | 0 .../_internal}/tests/testdata/csr-ipv6sans.pem | 0 .../_internal}/tests/testdata/csr-mixed.pem | 0 .../_internal}/tests/testdata/csr-nosans.pem | 0 .../{ => acme/_internal}/tests/testdata/csr-san.pem | 0 acme/{ => acme/_internal}/tests/testdata/csr.der | Bin acme/{ => acme/_internal}/tests/testdata/csr.pem | 0 .../_internal}/tests/testdata/dsa512_key.pem | 0 .../_internal}/tests/testdata/ec_secp384r1_key.pem | 0 .../_internal}/tests/testdata/rsa1024_cert.pem | 0 .../_internal}/tests/testdata/rsa1024_key.pem | 0 .../_internal}/tests/testdata/rsa2048_cert.pem | 0 .../_internal}/tests/testdata/rsa2048_key.pem | 0 .../_internal}/tests/testdata/rsa256_key.pem | 0 .../_internal}/tests/testdata/rsa4096_cert.pem | 0 .../_internal}/tests/testdata/rsa4096_key.pem | 0 .../_internal}/tests/testdata/rsa512_key.pem | 0 acme/{ => acme/_internal}/tests/util_test.py | 0 mypy.ini | 3 +++ tox.ini | 4 +++- 47 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 acme/acme/_internal/__init__.py create mode 100644 acme/acme/_internal/tests/__init__.py rename acme/{ => acme/_internal}/tests/challenges_test.py (99%) rename acme/{ => acme/_internal}/tests/client_test.py (99%) rename acme/{ => acme/_internal}/tests/crypto_util_test.py (99%) rename acme/{ => acme/_internal}/tests/errors_test.py (100%) rename acme/{ => acme/_internal}/tests/fields_test.py (100%) rename acme/{ => acme/_internal}/tests/jose_test.py (100%) rename acme/{ => acme/_internal}/tests/jws_test.py (97%) rename acme/{ => acme/_internal}/tests/messages_test.py (99%) rename acme/{ => acme/_internal}/tests/standalone_test.py (99%) rename acme/{ => acme/_internal}/tests/test_util.py (100%) rename acme/{ => acme/_internal}/tests/testdata/README (100%) rename acme/{ => acme/_internal}/tests/testdata/cert-100sans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/cert-idnsans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/cert-ipsans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/cert-ipv6sans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/cert-nocn.der (100%) rename acme/{ => acme/_internal}/tests/testdata/cert-san.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/cert.der (100%) rename acme/{ => acme/_internal}/tests/testdata/cert.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/critical-san.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-100sans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-6sans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-idnsans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-ipsans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-ipv6sans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-mixed.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-nosans.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr-san.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/csr.der (100%) rename acme/{ => acme/_internal}/tests/testdata/csr.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/dsa512_key.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/ec_secp384r1_key.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa1024_cert.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa1024_key.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa2048_cert.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa2048_key.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa256_key.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa4096_cert.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa4096_key.pem (100%) rename acme/{ => acme/_internal}/tests/testdata/rsa512_key.pem (100%) rename acme/{ => acme/_internal}/tests/util_test.py (100%) 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/mypy.ini b/mypy.ini index c776dc9a6..6c01929d4 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,4 +1,7 @@ [mypy] +# Removing this exclude setting is being tracked by +# https://github.com/certbot/certbot/issues/7909. +exclude = .*/_internal/tests/ ignore_missing_imports = True warn_unused_ignores = True show_error_codes = True diff --git a/tox.ini b/tox.ini index 3652205b1..d4502d88c 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 From 16cc1a74be67d3afc0f3aab16e831afbf1be0c02 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 28 Mar 2023 14:44:55 -0700 Subject: [PATCH 08/23] make certbot tests internal (#9627) This is the Certbot version of https://github.com/certbot/certbot/pull/9625. --- certbot/MANIFEST.in | 1 - certbot/certbot/_internal/tests/__init__.py | 1 + certbot/{ => certbot/_internal}/tests/account_test.py | 0 certbot/{ => certbot/_internal}/tests/auth_handler_test.py | 0 certbot/{ => certbot/_internal}/tests/cert_manager_test.py | 2 +- certbot/{ => certbot/_internal}/tests/cli_test.py | 0 certbot/{ => certbot/_internal}/tests/client_test.py | 0 certbot/{ => certbot/_internal}/tests/compat/__init__.py | 0 certbot/{ => certbot/_internal}/tests/compat/filesystem_test.py | 0 certbot/{ => certbot/_internal}/tests/compat/misc_test.py | 0 certbot/{ => certbot/_internal}/tests/compat/os_test.py | 0 certbot/{ => certbot/_internal}/tests/configuration_test.py | 0 certbot/{ => certbot/_internal}/tests/conftest.py | 0 certbot/{ => certbot/_internal}/tests/crypto_util_test.py | 0 certbot/{ => certbot/_internal}/tests/display/__init__.py | 0 certbot/{ => certbot/_internal}/tests/display/completer_test.py | 0 .../{ => certbot/_internal}/tests/display/internal_util_test.py | 0 certbot/{ => certbot/_internal}/tests/display/obj_test.py | 0 certbot/{ => certbot/_internal}/tests/display/ops_test.py | 0 certbot/{ => certbot/_internal}/tests/display/util_test.py | 0 certbot/{ => certbot/_internal}/tests/eff_test.py | 0 certbot/{ => certbot/_internal}/tests/error_handler_test.py | 0 certbot/{ => certbot/_internal}/tests/errors_test.py | 0 certbot/{ => certbot/_internal}/tests/helpful_test.py | 0 certbot/{ => certbot/_internal}/tests/hook_test.py | 0 certbot/{ => certbot/_internal}/tests/lock_test.py | 0 certbot/{ => certbot/_internal}/tests/log_test.py | 0 certbot/{ => certbot/_internal}/tests/main_test.py | 0 certbot/{ => certbot/_internal}/tests/ocsp_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/__init__.py | 0 certbot/{ => certbot/_internal}/tests/plugins/common_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/disco_test.py | 0 .../_internal}/tests/plugins/dns_common_lexicon_test.py | 0 .../{ => certbot/_internal}/tests/plugins/dns_common_test.py | 0 .../{ => certbot/_internal}/tests/plugins/enhancements_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/manual_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/null_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/selection_test.py | 0 .../{ => certbot/_internal}/tests/plugins/standalone_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/storage_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/util_test.py | 0 certbot/{ => certbot/_internal}/tests/plugins/webroot_test.py | 0 certbot/{ => certbot/_internal}/tests/renewal_test.py | 0 certbot/{ => certbot/_internal}/tests/renewupdater_test.py | 0 certbot/{ => certbot/_internal}/tests/reverter_test.py | 0 certbot/{ => certbot/_internal}/tests/storage_test.py | 0 certbot/{ => certbot/_internal}/tests/util_test.py | 0 47 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 certbot/certbot/_internal/tests/__init__.py rename certbot/{ => certbot/_internal}/tests/account_test.py (100%) rename certbot/{ => certbot/_internal}/tests/auth_handler_test.py (100%) rename certbot/{ => certbot/_internal}/tests/cert_manager_test.py (99%) rename certbot/{ => certbot/_internal}/tests/cli_test.py (100%) rename certbot/{ => certbot/_internal}/tests/client_test.py (100%) rename certbot/{ => certbot/_internal}/tests/compat/__init__.py (100%) rename certbot/{ => certbot/_internal}/tests/compat/filesystem_test.py (100%) rename certbot/{ => certbot/_internal}/tests/compat/misc_test.py (100%) rename certbot/{ => certbot/_internal}/tests/compat/os_test.py (100%) rename certbot/{ => certbot/_internal}/tests/configuration_test.py (100%) rename certbot/{ => certbot/_internal}/tests/conftest.py (100%) rename certbot/{ => certbot/_internal}/tests/crypto_util_test.py (100%) rename certbot/{ => certbot/_internal}/tests/display/__init__.py (100%) rename certbot/{ => certbot/_internal}/tests/display/completer_test.py (100%) rename certbot/{ => certbot/_internal}/tests/display/internal_util_test.py (100%) rename certbot/{ => certbot/_internal}/tests/display/obj_test.py (100%) rename certbot/{ => certbot/_internal}/tests/display/ops_test.py (100%) rename certbot/{ => certbot/_internal}/tests/display/util_test.py (100%) rename certbot/{ => certbot/_internal}/tests/eff_test.py (100%) rename certbot/{ => certbot/_internal}/tests/error_handler_test.py (100%) rename certbot/{ => certbot/_internal}/tests/errors_test.py (100%) rename certbot/{ => certbot/_internal}/tests/helpful_test.py (100%) rename certbot/{ => certbot/_internal}/tests/hook_test.py (100%) rename certbot/{ => certbot/_internal}/tests/lock_test.py (100%) rename certbot/{ => certbot/_internal}/tests/log_test.py (100%) rename certbot/{ => certbot/_internal}/tests/main_test.py (100%) rename certbot/{ => certbot/_internal}/tests/ocsp_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/__init__.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/common_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/disco_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/dns_common_lexicon_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/dns_common_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/enhancements_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/manual_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/null_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/selection_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/standalone_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/storage_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/util_test.py (100%) rename certbot/{ => certbot/_internal}/tests/plugins/webroot_test.py (100%) rename certbot/{ => certbot/_internal}/tests/renewal_test.py (100%) rename certbot/{ => certbot/_internal}/tests/renewupdater_test.py (100%) rename certbot/{ => certbot/_internal}/tests/reverter_test.py (100%) rename certbot/{ => certbot/_internal}/tests/storage_test.py (100%) rename certbot/{ => certbot/_internal}/tests/util_test.py (100%) 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/_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 100% rename from certbot/tests/main_test.py rename to certbot/certbot/_internal/tests/main_test.py 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 100% rename from certbot/tests/plugins/common_test.py rename to certbot/certbot/_internal/tests/plugins/common_test.py 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 100% rename from certbot/tests/renewal_test.py rename to certbot/certbot/_internal/tests/renewal_test.py 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 100% rename from certbot/tests/util_test.py rename to certbot/certbot/_internal/tests/util_test.py From ed6bbde38fc94bcce0dfd797187b1efe801b274d Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 28 Mar 2023 14:55:44 -0700 Subject: [PATCH 09/23] Make apache tests internal (#9637) This is the certbot-apache version of #9625. --- certbot-apache/MANIFEST.in | 2 +- certbot-apache/certbot_apache/_internal/tests/__init__.py | 1 + .../_internal}/tests/apache-conf-files/NEEDED.txt | 0 .../_internal}/tests/apache-conf-files/apache-conf-test | 0 .../tests/apache-conf-files/apache-conf-test-pebble.py | 0 .../apache-conf-files/failing/missing-double-quote-1724.conf | 0 .../tests/apache-conf-files/failing/multivhost-1093.conf | 0 .../tests/apache-conf-files/failing/multivhost-1093b.conf | 0 .../tests/apache-conf-files/passing/1626-1531.conf | 0 .../tests/apache-conf-files/passing/README.modules | 0 .../tests/apache-conf-files/passing/anarcat-1531.conf | 0 .../passing/comment-continuations-2050.conf | 0 .../passing/drupal-errordocument-arg-1724.conf | 0 .../apache-conf-files/passing/drupal-htaccess-1531.conf | 0 .../passing/escaped-space-arguments-2735.conf | 0 .../tests/apache-conf-files/passing/example-1755.conf | 0 .../tests/apache-conf-files/passing/example-ssl.conf | 0 .../_internal}/tests/apache-conf-files/passing/example.conf | 0 .../apache-conf-files/passing/finalize-1243.apache2.conf.txt | 0 .../tests/apache-conf-files/passing/finalize-1243.conf | 0 .../tests/apache-conf-files/passing/graphite-quote-1934.conf | 0 .../tests/apache-conf-files/passing/ipv6-1143.conf | 0 .../tests/apache-conf-files/passing/ipv6-1143b.conf | 0 .../tests/apache-conf-files/passing/ipv6-1143c.conf | 0 .../tests/apache-conf-files/passing/ipv6-1143d.conf | 0 .../tests/apache-conf-files/passing/missing-quote-1724.conf | 0 .../tests/apache-conf-files/passing/modmacro-1385.conf | 0 .../tests/apache-conf-files/passing/owncloud-1264.conf | 0 .../tests/apache-conf-files/passing/rewrite-quote-1960.conf | 0 .../tests/apache-conf-files/passing/roundcube-1222.conf | 0 .../passing/section-continuations-2525.conf | 0 .../passing/section-empty-continuations-2731.conf | 0 .../tests/apache-conf-files/passing/semacode-1598.conf | 0 .../passing/sslrequire-wordlist-1827.htaccess | 0 .../apache-conf-files/passing/two-blocks-one-line-1693.conf | 0 .../{ => certbot_apache/_internal}/tests/augeasnode_test.py | 5 +++-- .../{ => certbot_apache/_internal}/tests/autohsts_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/centos_test.py | 2 +- .../_internal}/tests/complex_parsing_test.py | 2 +- .../_internal}/tests/configurator_reverter_test.py | 2 +- .../_internal}/tests/configurator_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/debian_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/display_ops_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/dualnode_test.py | 0 .../{ => certbot_apache/_internal}/tests/entrypoint_test.py | 0 .../{ => certbot_apache/_internal}/tests/fedora_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/gentoo_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/http_01_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/obj_test.py | 0 .../{ => certbot_apache/_internal}/tests/parser_test.py | 2 +- .../_internal}/tests/parsernode_configurator_test.py | 2 +- .../{ => certbot_apache/_internal}/tests/parsernode_test.py | 0 .../_internal}/tests/parsernode_util_test.py | 0 .../tests/testdata/centos7_apache/apache/httpd/conf.d/README | 0 .../centos7_apache/apache/httpd/conf.d/autoindex.conf | 0 .../apache/httpd/conf.d/centos.example.com.conf | 0 .../testdata/centos7_apache/apache/httpd/conf.d/ssl.conf | 0 .../testdata/centos7_apache/apache/httpd/conf.d/userdir.conf | 0 .../testdata/centos7_apache/apache/httpd/conf.d/welcome.conf | 0 .../centos7_apache/apache/httpd/conf.modules.d/00-base.conf | 0 .../centos7_apache/apache/httpd/conf.modules.d/00-dav.conf | 0 .../centos7_apache/apache/httpd/conf.modules.d/00-lua.conf | 0 .../centos7_apache/apache/httpd/conf.modules.d/00-mpm.conf | 0 .../centos7_apache/apache/httpd/conf.modules.d/00-proxy.conf | 0 .../centos7_apache/apache/httpd/conf.modules.d/00-ssl.conf | 0 .../apache/httpd/conf.modules.d/00-systemd.conf | 0 .../centos7_apache/apache/httpd/conf.modules.d/01-cgi.conf | 0 .../testdata/centos7_apache/apache/httpd/conf/httpd.conf | 0 .../tests/testdata/centos7_apache/apache/httpd/conf/magic | 0 .../_internal}/tests/testdata/centos7_apache/apache/sites | 0 .../tests/testdata/centos7_apache/apache/sysconfig/httpd | 0 .../_internal}/tests/testdata/complex_parsing/apache2.conf | 0 .../tests/testdata/complex_parsing/conf-enabled/dummy.conf | 0 .../tests/testdata/complex_parsing/test_fnmatch.conf | 0 .../tests/testdata/complex_parsing/test_variables.conf | 0 .../debian_apache_2_4/augeas_vhosts/apache2/apache2.conf | 0 .../augeas_vhosts/apache2/conf-available/bad_conf_file.conf | 0 .../apache2/conf-available/other-vhosts-access-log.conf | 0 .../augeas_vhosts/apache2/conf-available/security.conf | 0 .../augeas_vhosts/apache2/conf-available/serve-cgi-bin.conf | 0 .../apache2/conf-enabled/other-vhosts-access-log.conf | 0 .../augeas_vhosts/apache2/conf-enabled/security.conf | 0 .../augeas_vhosts/apache2/conf-enabled/serve-cgi-bin.conf | 0 .../testdata/debian_apache_2_4/augeas_vhosts/apache2/envvars | 0 .../augeas_vhosts/apache2/mods-available/authz_svn.load | 0 .../augeas_vhosts/apache2/mods-available/dav.load | 0 .../augeas_vhosts/apache2/mods-available/dav_svn.conf | 0 .../augeas_vhosts/apache2/mods-available/dav_svn.load | 0 .../augeas_vhosts/apache2/mods-available/rewrite.load | 0 .../augeas_vhosts/apache2/mods-available/ssl.conf | 0 .../augeas_vhosts/apache2/mods-available/ssl.load | 0 .../augeas_vhosts/apache2/mods-enabled/authz_svn.load | 0 .../augeas_vhosts/apache2/mods-enabled/dav.load | 0 .../augeas_vhosts/apache2/mods-enabled/dav_svn.conf | 0 .../augeas_vhosts/apache2/mods-enabled/dav_svn.load | 0 .../debian_apache_2_4/augeas_vhosts/apache2/ports.conf | 0 .../apache2/sites-available/another_wildcard.conf | 0 .../apache2/sites-available/old-and-default.conf | 0 .../augeas_vhosts/apache2/sites-available/wildcard.conf | 0 .../apache2/sites-enabled/another_wildcard.conf | 0 .../augeas_vhosts/apache2/sites-enabled/old-and-default.conf | 0 .../augeas_vhosts/apache2/sites-enabled/wildcard.conf | 0 .../tests/testdata/debian_apache_2_4/augeas_vhosts/sites | 0 .../debian_apache_2_4/default_vhost/apache2/apache2.conf | 0 .../apache2/conf-available/other-vhosts-access-log.conf | 0 .../default_vhost/apache2/conf-available/security.conf | 0 .../default_vhost/apache2/conf-available/serve-cgi-bin.conf | 0 .../apache2/conf-enabled/other-vhosts-access-log.conf | 0 .../default_vhost/apache2/conf-enabled/security.conf | 0 .../default_vhost/apache2/conf-enabled/serve-cgi-bin.conf | 0 .../testdata/debian_apache_2_4/default_vhost/apache2/envvars | 0 .../default_vhost/apache2/mods-available/ssl.conf | 0 .../default_vhost/apache2/mods-available/ssl.load | 0 .../debian_apache_2_4/default_vhost/apache2/ports.conf | 0 .../default_vhost/apache2/sites-available/000-default.conf | 0 .../default_vhost/apache2/sites-available/default-ssl.conf | 0 .../default_vhost/apache2/sites-enabled/000-default.conf | 0 .../tests/testdata/debian_apache_2_4/default_vhost/sites | 0 .../debian_apache_2_4/multi_vhosts/apache2/apache2.conf | 0 .../testdata/debian_apache_2_4/multi_vhosts/apache2/envvars | 0 .../debian_apache_2_4/multi_vhosts/apache2/ports.conf | 0 .../multi_vhosts/apache2/sites-available/default.conf | 0 .../multi_vhosts/apache2/sites-available/multi-vhost.conf | 0 .../multi_vhosts/apache2/sites-enabled/default.conf | 0 .../multi_vhosts/apache2/sites-enabled/multi-vhost.conf | 0 .../debian_apache_2_4/multiple_vhosts/apache2/apache2.conf | 0 .../apache2/conf-available/bad_conf_file.conf | 0 .../apache2/conf-available/other-vhosts-access-log.conf | 0 .../multiple_vhosts/apache2/conf-available/security.conf | 0 .../apache2/conf-available/serve-cgi-bin.conf | 0 .../apache2/conf-enabled/other-vhosts-access-log.conf | 0 .../multiple_vhosts/apache2/conf-enabled/security.conf | 0 .../multiple_vhosts/apache2/conf-enabled/serve-cgi-bin.conf | 0 .../debian_apache_2_4/multiple_vhosts/apache2/envvars | 0 .../multiple_vhosts/apache2/mods-available/authz_svn.load | 0 .../multiple_vhosts/apache2/mods-available/dav.load | 0 .../multiple_vhosts/apache2/mods-available/dav_svn.conf | 0 .../multiple_vhosts/apache2/mods-available/dav_svn.load | 0 .../multiple_vhosts/apache2/mods-available/rewrite.load | 0 .../multiple_vhosts/apache2/mods-available/ssl.conf | 0 .../multiple_vhosts/apache2/mods-available/ssl.load | 0 .../multiple_vhosts/apache2/mods-enabled/authz_svn.load | 0 .../multiple_vhosts/apache2/mods-enabled/dav.load | 0 .../multiple_vhosts/apache2/mods-enabled/dav_svn.conf | 0 .../multiple_vhosts/apache2/mods-enabled/dav_svn.load | 0 .../debian_apache_2_4/multiple_vhosts/apache2/ports.conf | 0 .../multiple_vhosts/apache2/sites-available/000-default.conf | 0 .../multiple_vhosts/apache2/sites-available/certbot.conf | 0 .../apache2/sites-available/default-ssl-port-only.conf | 0 .../multiple_vhosts/apache2/sites-available/default-ssl.conf | 0 .../apache2/sites-available/duplicatehttp.conf | 0 .../apache2/sites-available/duplicatehttps.conf | 0 .../multiple_vhosts/apache2/sites-available/empty.conf | 0 .../apache2/sites-available/encryption-example.conf | 0 .../apache2/sites-available/mod_macro-example.conf | 0 .../apache2/sites-available/no-directives.conf | 0 .../multiple_vhosts/apache2/sites-available/ocsp-ssl.conf | 0 .../multiple_vhosts/apache2/sites-available/wildcard.conf | 0 .../multiple_vhosts/apache2/sites-enabled/000-default.conf | 0 .../multiple_vhosts/apache2/sites-enabled/certbot.conf | 0 .../apache2/sites-enabled/default-ssl-port-only.conf | 0 .../multiple_vhosts/apache2/sites-enabled/default-ssl.conf | 0 .../multiple_vhosts/apache2/sites-enabled/duplicatehttp.conf | 0 .../apache2/sites-enabled/duplicatehttps.conf | 0 .../apache2/sites-enabled/encryption-example.conf | 0 .../apache2/sites-enabled/mod_macro-example.conf | 0 .../multiple_vhosts/apache2/sites-enabled/non-symlink.conf | 0 .../multiple_vhosts/apache2/sites-enabled/ocsp-ssl.conf | 0 .../multiple_vhosts/apache2/sites-enabled/wildcard.conf | 0 .../tests/testdata/debian_apache_2_4/multiple_vhosts/sites | 0 .../tests/testdata/gentoo_apache/apache/apache2/httpd.conf | 0 .../tests/testdata/gentoo_apache/apache/apache2/magic | 0 .../apache/apache2/modules.d/00_default_settings.conf | 0 .../apache/apache2/modules.d/00_error_documents.conf | 0 .../gentoo_apache/apache/apache2/modules.d/00_languages.conf | 0 .../apache/apache2/modules.d/00_mod_autoindex.conf | 0 .../gentoo_apache/apache/apache2/modules.d/00_mod_info.conf | 0 .../apache/apache2/modules.d/00_mod_log_config.conf | 0 .../gentoo_apache/apache/apache2/modules.d/00_mod_mime.conf | 0 .../apache/apache2/modules.d/00_mod_status.conf | 0 .../apache/apache2/modules.d/00_mod_userdir.conf | 0 .../gentoo_apache/apache/apache2/modules.d/00_mpm.conf | 0 .../apache/apache2/modules.d/10_mod_mem_cache.conf | 0 .../gentoo_apache/apache/apache2/modules.d/40_mod_ssl.conf | 0 .../gentoo_apache/apache/apache2/modules.d/41_mod_http2.conf | 0 .../gentoo_apache/apache/apache2/modules.d/45_mod_dav.conf | 0 .../gentoo_apache/apache/apache2/modules.d/46_mod_ldap.conf | 0 .../apache/apache2/vhosts.d/00_default_ssl_vhost.conf | 0 .../apache/apache2/vhosts.d/00_default_vhost.conf | 0 .../apache/apache2/vhosts.d/default_vhost.include | 0 .../apache/apache2/vhosts.d/gentoo.example.com.conf | 0 .../tests/testdata/gentoo_apache/apache/conf.d/apache2 | 0 .../_internal}/tests/testdata/gentoo_apache/apache/sites | 0 certbot-apache/{ => certbot_apache/_internal}/tests/util.py | 0 tox.ini | 4 ++-- 195 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 certbot-apache/certbot_apache/_internal/tests/__init__.py rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/NEEDED.txt (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/apache-conf-test (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/apache-conf-test-pebble.py (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/failing/missing-double-quote-1724.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/failing/multivhost-1093.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/failing/multivhost-1093b.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/1626-1531.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/README.modules (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/anarcat-1531.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/comment-continuations-2050.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/drupal-errordocument-arg-1724.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/drupal-htaccess-1531.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/escaped-space-arguments-2735.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/example-1755.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/example-ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/example.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/finalize-1243.apache2.conf.txt (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/finalize-1243.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/graphite-quote-1934.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/ipv6-1143.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/ipv6-1143b.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/ipv6-1143c.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/ipv6-1143d.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/missing-quote-1724.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/modmacro-1385.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/owncloud-1264.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/rewrite-quote-1960.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/roundcube-1222.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/section-continuations-2525.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/section-empty-continuations-2731.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/semacode-1598.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/sslrequire-wordlist-1827.htaccess (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/apache-conf-files/passing/two-blocks-one-line-1693.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/augeasnode_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/autohsts_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/centos_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/complex_parsing_test.py (98%) rename certbot-apache/{ => certbot_apache/_internal}/tests/configurator_reverter_test.py (98%) rename certbot-apache/{ => certbot_apache/_internal}/tests/configurator_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/debian_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/display_ops_test.py (98%) rename certbot-apache/{ => certbot_apache/_internal}/tests/dualnode_test.py (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/entrypoint_test.py (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/fedora_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/gentoo_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/http_01_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/obj_test.py (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/parser_test.py (99%) rename certbot-apache/{ => certbot_apache/_internal}/tests/parsernode_configurator_test.py (97%) rename certbot-apache/{ => certbot_apache/_internal}/tests/parsernode_test.py (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/parsernode_util_test.py (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.d/README (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.d/autoindex.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.d/centos.example.com.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.d/ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.d/userdir.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.d/welcome.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-base.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-dav.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-lua.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-mpm.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-proxy.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-systemd.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/01-cgi.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf/httpd.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/httpd/conf/magic (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/sites (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/centos7_apache/apache/sysconfig/httpd (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/complex_parsing/apache2.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/complex_parsing/conf-enabled/dummy.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/complex_parsing/test_fnmatch.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/complex_parsing/test_variables.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/apache2.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/bad_conf_file.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/other-vhosts-access-log.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/security.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/serve-cgi-bin.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/security.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/serve-cgi-bin.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/envvars (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/authz_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/rewrite.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/authz_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/ports.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/another_wildcard.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/old-and-default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/wildcard.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/another_wildcard.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/old-and-default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/wildcard.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/augeas_vhosts/sites (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/apache2.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/other-vhosts-access-log.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/security.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/serve-cgi-bin.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/other-vhosts-access-log.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/security.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/serve-cgi-bin.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/envvars (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/ports.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/000-default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/default-ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-enabled/000-default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/default_vhost/sites (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/apache2.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/envvars (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/ports.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/multi-vhost.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/multi-vhost.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/apache2.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/bad_conf_file.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/other-vhosts-access-log.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/security.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/serve-cgi-bin.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/security.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/serve-cgi-bin.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/envvars (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/authz_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/rewrite.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/authz_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.load (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/ports.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/000-default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/certbot.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl-port-only.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttp.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttps.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/empty.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/mod_macro-example.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/ocsp-ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/wildcard.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/000-default.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/certbot.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl-port-only.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttp.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttps.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/encryption-example.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/mod_macro-example.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/non-symlink.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/ocsp-ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/wildcard.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/debian_apache_2_4/multiple_vhosts/sites (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/httpd.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/magic (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_default_settings.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_error_documents.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_languages.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_autoindex.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_info.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_log_config.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_mime.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_status.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_userdir.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mpm.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/10_mod_mem_cache.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/40_mod_ssl.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/41_mod_http2.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/45_mod_dav.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/modules.d/46_mod_ldap.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_ssl_vhost.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_vhost.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/default_vhost.include (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/gentoo.example.com.conf (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/conf.d/apache2 (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/testdata/gentoo_apache/apache/sites (100%) rename certbot-apache/{ => certbot_apache/_internal}/tests/util.py (100%) 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 100% 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 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/tox.ini b/tox.ini index d4502d88c..04652a4a1 100644 --- a/tox.ini +++ b/tox.ini @@ -132,7 +132,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 +141,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 = From 9e30e8afa9fafe0db96e3683b9dec682d03a99b3 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 28 Mar 2023 15:01:31 -0700 Subject: [PATCH 10/23] make tests internal (#9638) This is the certbot-nginx version of #9625. --- certbot-nginx/MANIFEST.in | 2 +- certbot-nginx/certbot_nginx/_internal/tests/__init__.py | 1 + .../_internal}/tests/boulder-integration.conf.sh | 0 .../{ => certbot_nginx/_internal}/tests/configurator_test.py | 2 +- .../{ => certbot_nginx/_internal}/tests/display_ops_test.py | 2 +- .../{ => certbot_nginx/_internal}/tests/http_01_test.py | 2 +- .../{ => certbot_nginx/_internal}/tests/nginxparser_test.py | 2 +- certbot-nginx/{ => certbot_nginx/_internal}/tests/obj_test.py | 0 .../{ => certbot_nginx/_internal}/tests/parser_obj_test.py | 0 .../{ => certbot_nginx/_internal}/tests/parser_test.py | 2 +- certbot-nginx/{ => certbot_nginx/_internal}/tests/test_util.py | 0 .../_internal}/tests/testdata/etc_nginx/broken.conf | 0 .../_internal}/tests/testdata/etc_nginx/comment_in_file.conf | 0 .../_internal}/tests/testdata/etc_nginx/edge_cases.conf | 0 .../_internal}/tests/testdata/etc_nginx/foo.conf | 0 .../tests/testdata/etc_nginx/invalid_unicode_comments.conf | 0 .../_internal}/tests/testdata/etc_nginx/mime.types | 0 .../tests/testdata/etc_nginx/minimalistic_comments.conf | 0 .../_internal}/tests/testdata/etc_nginx/multiline_quotes.conf | 0 .../_internal}/tests/testdata/etc_nginx/nginx.conf | 0 .../_internal}/tests/testdata/etc_nginx/server.conf | 0 .../_internal}/tests/testdata/etc_nginx/sites-enabled/both.com | 0 .../_internal}/tests/testdata/etc_nginx/sites-enabled/default | 0 .../tests/testdata/etc_nginx/sites-enabled/example.com | 0 .../tests/testdata/etc_nginx/sites-enabled/example.net | 0 .../tests/testdata/etc_nginx/sites-enabled/globalssl.com | 0 .../tests/testdata/etc_nginx/sites-enabled/headers.com | 0 .../_internal}/tests/testdata/etc_nginx/sites-enabled/ipv6.com | 0 .../tests/testdata/etc_nginx/sites-enabled/ipv6ssl.com | 0 .../tests/testdata/etc_nginx/sites-enabled/migration.com | 0 .../_internal}/tests/testdata/etc_nginx/sites-enabled/sslon.com | 0 .../ubuntu_nginx_1_4_6/default_vhost/nginx/fastcgi_params | 0 .../etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-utf | 0 .../etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-win | 0 .../etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/mime.types | 0 .../ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi-ui.conf.1.4.1 | 0 .../ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi.rules | 0 .../ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi_core.rules | 0 .../etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/nginx.conf | 0 .../ubuntu_nginx_1_4_6/default_vhost/nginx/proxy_params | 0 .../ubuntu_nginx_1_4_6/default_vhost/nginx/scgi_params | 0 .../default_vhost/nginx/sites-available/default | 0 .../default_vhost/nginx/sites-enabled/default | 0 .../ubuntu_nginx_1_4_6/default_vhost/nginx/uwsgi_params | 0 .../etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/win-utf | 0 .../tests/testdata/etc_nginx/valid_unicode_comments.conf | 0 46 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 certbot-nginx/certbot_nginx/_internal/tests/__init__.py rename certbot-nginx/{ => certbot_nginx/_internal}/tests/boulder-integration.conf.sh (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/configurator_test.py (99%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/display_ops_test.py (96%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/http_01_test.py (99%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/nginxparser_test.py (99%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/obj_test.py (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/parser_obj_test.py (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/parser_test.py (99%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/test_util.py (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/broken.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/comment_in_file.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/edge_cases.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/foo.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/invalid_unicode_comments.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/mime.types (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/minimalistic_comments.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/multiline_quotes.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/nginx.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/server.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/both.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/default (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/example.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/example.net (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/globalssl.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/headers.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/ipv6.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/ipv6ssl.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/migration.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/sites-enabled/sslon.com (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/fastcgi_params (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-utf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-win (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/mime.types (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi-ui.conf.1.4.1 (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi.rules (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi_core.rules (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/nginx.conf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/proxy_params (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/scgi_params (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-available/default (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-enabled/default (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/uwsgi_params (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/win-utf (100%) rename certbot-nginx/{ => certbot_nginx/_internal}/tests/testdata/etc_nginx/valid_unicode_comments.conf (100%) 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/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/boulder-integration.conf.sh b/certbot-nginx/certbot_nginx/_internal/tests/boulder-integration.conf.sh similarity index 100% rename from certbot-nginx/tests/boulder-integration.conf.sh rename to certbot-nginx/certbot_nginx/_internal/tests/boulder-integration.conf.sh 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 99% rename from certbot-nginx/tests/http_01_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py index e0809f68a..6726b85ad 100644 --- a/certbot-nginx/tests/http_01_test.py +++ b/certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py @@ -11,7 +11,7 @@ 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")) diff --git a/certbot-nginx/tests/nginxparser_test.py b/certbot-nginx/certbot_nginx/_internal/tests/nginxparser_test.py similarity index 99% rename from certbot-nginx/tests/nginxparser_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/nginxparser_test.py index 44fdfd141..51a454380 100644 --- a/certbot-nginx/tests/nginxparser_test.py +++ b/certbot-nginx/certbot_nginx/_internal/tests/nginxparser_test.py @@ -14,7 +14,7 @@ from certbot_nginx._internal.nginxparser import load from certbot_nginx._internal.nginxparser import loads from certbot_nginx._internal.nginxparser import RawNginxParser from certbot_nginx._internal.nginxparser import UnspacedList -import test_util as util +from certbot_nginx._internal.tests import test_util as util FIRST = operator.itemgetter(0) diff --git a/certbot-nginx/tests/obj_test.py b/certbot-nginx/certbot_nginx/_internal/tests/obj_test.py similarity index 100% rename from certbot-nginx/tests/obj_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/obj_test.py diff --git a/certbot-nginx/tests/parser_obj_test.py b/certbot-nginx/certbot_nginx/_internal/tests/parser_obj_test.py similarity index 100% rename from certbot-nginx/tests/parser_obj_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/parser_obj_test.py diff --git a/certbot-nginx/tests/parser_test.py b/certbot-nginx/certbot_nginx/_internal/tests/parser_test.py similarity index 99% rename from certbot-nginx/tests/parser_test.py rename to certbot-nginx/certbot_nginx/_internal/tests/parser_test.py index f9cdb819c..f45c2e45d 100644 --- a/certbot-nginx/tests/parser_test.py +++ b/certbot-nginx/certbot_nginx/_internal/tests/parser_test.py @@ -12,7 +12,7 @@ from certbot.compat import os from certbot_nginx._internal import nginxparser from certbot_nginx._internal import obj from certbot_nginx._internal import parser -import test_util as util +from certbot_nginx._internal.tests import test_util as util class NginxParserTest(util.NginxTest): diff --git a/certbot-nginx/tests/test_util.py b/certbot-nginx/certbot_nginx/_internal/tests/test_util.py similarity index 100% rename from certbot-nginx/tests/test_util.py rename to certbot-nginx/certbot_nginx/_internal/tests/test_util.py diff --git a/certbot-nginx/tests/testdata/etc_nginx/broken.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/broken.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/broken.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/broken.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/comment_in_file.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/comment_in_file.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/comment_in_file.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/comment_in_file.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/edge_cases.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/edge_cases.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/edge_cases.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/edge_cases.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/foo.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/foo.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/foo.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/foo.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/invalid_unicode_comments.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/invalid_unicode_comments.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/invalid_unicode_comments.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/invalid_unicode_comments.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/mime.types b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/mime.types similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/mime.types rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/mime.types diff --git a/certbot-nginx/tests/testdata/etc_nginx/minimalistic_comments.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/minimalistic_comments.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/minimalistic_comments.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/minimalistic_comments.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/multiline_quotes.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/multiline_quotes.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/multiline_quotes.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/multiline_quotes.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/nginx.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/nginx.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/nginx.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/nginx.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/server.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/server.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/server.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/server.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/both.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/both.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/both.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/both.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/default b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/default similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/default rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/default diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/example.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/example.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/example.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/example.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/example.net b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/example.net similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/example.net rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/example.net diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/globalssl.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/globalssl.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/globalssl.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/globalssl.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/headers.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/headers.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/headers.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/headers.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/ipv6.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/ipv6.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/ipv6.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/ipv6.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/ipv6ssl.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/ipv6ssl.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/ipv6ssl.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/ipv6ssl.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/migration.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/migration.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/migration.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/migration.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/sites-enabled/sslon.com b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/sslon.com similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/sites-enabled/sslon.com rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/sites-enabled/sslon.com diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/fastcgi_params b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/fastcgi_params similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/fastcgi_params rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/fastcgi_params diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-utf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-utf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-utf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-utf diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-win b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-win similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-win rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/koi-win diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/mime.types b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/mime.types similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/mime.types rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/mime.types diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi-ui.conf.1.4.1 b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi-ui.conf.1.4.1 similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi-ui.conf.1.4.1 rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi-ui.conf.1.4.1 diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi.rules b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi.rules similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi.rules rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi.rules diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi_core.rules b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi_core.rules similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi_core.rules rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/naxsi_core.rules diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/nginx.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/nginx.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/nginx.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/nginx.conf diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/proxy_params b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/proxy_params similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/proxy_params rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/proxy_params diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/scgi_params b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/scgi_params similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/scgi_params rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/scgi_params diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-available/default b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-available/default similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-available/default rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-available/default diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-enabled/default b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-enabled/default similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-enabled/default rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/sites-enabled/default diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/uwsgi_params b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/uwsgi_params similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/uwsgi_params rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/uwsgi_params diff --git a/certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/win-utf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/win-utf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/win-utf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/ubuntu_nginx_1_4_6/default_vhost/nginx/win-utf diff --git a/certbot-nginx/tests/testdata/etc_nginx/valid_unicode_comments.conf b/certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/valid_unicode_comments.conf similarity index 100% rename from certbot-nginx/tests/testdata/etc_nginx/valid_unicode_comments.conf rename to certbot-nginx/certbot_nginx/_internal/tests/testdata/etc_nginx/valid_unicode_comments.conf From ba3dde938459ca3ab7983a6eb812da4034d2d25c Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 28 Mar 2023 15:10:34 -0700 Subject: [PATCH 11/23] make dns tests internal (#9639) --- certbot-dns-cloudflare/MANIFEST.in | 1 - .../certbot_dns_cloudflare/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_cloudflare_test.py | 0 certbot-dns-digitalocean/MANIFEST.in | 1 - .../certbot_dns_digitalocean/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_digitalocean_test.py | 0 certbot-dns-dnsimple/MANIFEST.in | 1 - .../certbot_dns_dnsimple/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_dnsimple_test.py | 0 certbot-dns-dnsmadeeasy/MANIFEST.in | 1 - .../certbot_dns_dnsmadeeasy/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_dnsmadeeasy_test.py | 0 certbot-dns-gehirn/MANIFEST.in | 1 - .../certbot_dns_gehirn/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_gehirn_test.py | 0 certbot-dns-google/MANIFEST.in | 3 +-- .../certbot_dns_google/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_google_test.py | 0 .../_internal}/tests/testdata/discovery.json | 0 certbot-dns-linode/MANIFEST.in | 1 - .../certbot_dns_linode/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_linode_test.py | 0 certbot-dns-luadns/MANIFEST.in | 1 - .../certbot_dns_luadns/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_luadns_test.py | 0 certbot-dns-nsone/MANIFEST.in | 1 - .../certbot_dns_nsone/_internal/tests/__init__.py | 1 + .../{ => certbot_dns_nsone/_internal}/tests/dns_nsone_test.py | 0 certbot-dns-ovh/MANIFEST.in | 1 - certbot-dns-ovh/certbot_dns_ovh/_internal/tests/__init__.py | 1 + .../{ => certbot_dns_ovh/_internal}/tests/dns_ovh_test.py | 0 certbot-dns-rfc2136/MANIFEST.in | 1 - .../certbot_dns_rfc2136/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_rfc2136_test.py | 0 certbot-dns-route53/MANIFEST.in | 1 - .../certbot_dns_route53/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_route53_test.py | 0 certbot-dns-sakuracloud/MANIFEST.in | 1 - .../certbot_dns_sakuracloud/_internal/tests/__init__.py | 1 + .../_internal}/tests/dns_sakuracloud_test.py | 0 40 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/tests/__init__.py rename certbot-dns-cloudflare/{ => certbot_dns_cloudflare/_internal}/tests/dns_cloudflare_test.py (100%) create mode 100644 certbot-dns-digitalocean/certbot_dns_digitalocean/_internal/tests/__init__.py rename certbot-dns-digitalocean/{ => certbot_dns_digitalocean/_internal}/tests/dns_digitalocean_test.py (100%) create mode 100644 certbot-dns-dnsimple/certbot_dns_dnsimple/_internal/tests/__init__.py rename certbot-dns-dnsimple/{ => certbot_dns_dnsimple/_internal}/tests/dns_dnsimple_test.py (100%) create mode 100644 certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy/_internal/tests/__init__.py rename certbot-dns-dnsmadeeasy/{ => certbot_dns_dnsmadeeasy/_internal}/tests/dns_dnsmadeeasy_test.py (100%) create mode 100644 certbot-dns-gehirn/certbot_dns_gehirn/_internal/tests/__init__.py rename certbot-dns-gehirn/{ => certbot_dns_gehirn/_internal}/tests/dns_gehirn_test.py (100%) create mode 100644 certbot-dns-google/certbot_dns_google/_internal/tests/__init__.py rename certbot-dns-google/{ => certbot_dns_google/_internal}/tests/dns_google_test.py (100%) rename certbot-dns-google/{ => certbot_dns_google/_internal}/tests/testdata/discovery.json (100%) create mode 100644 certbot-dns-linode/certbot_dns_linode/_internal/tests/__init__.py rename certbot-dns-linode/{ => certbot_dns_linode/_internal}/tests/dns_linode_test.py (100%) create mode 100644 certbot-dns-luadns/certbot_dns_luadns/_internal/tests/__init__.py rename certbot-dns-luadns/{ => certbot_dns_luadns/_internal}/tests/dns_luadns_test.py (100%) create mode 100644 certbot-dns-nsone/certbot_dns_nsone/_internal/tests/__init__.py rename certbot-dns-nsone/{ => certbot_dns_nsone/_internal}/tests/dns_nsone_test.py (100%) create mode 100644 certbot-dns-ovh/certbot_dns_ovh/_internal/tests/__init__.py rename certbot-dns-ovh/{ => certbot_dns_ovh/_internal}/tests/dns_ovh_test.py (100%) create mode 100644 certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/tests/__init__.py rename certbot-dns-rfc2136/{ => certbot_dns_rfc2136/_internal}/tests/dns_rfc2136_test.py (100%) create mode 100644 certbot-dns-route53/certbot_dns_route53/_internal/tests/__init__.py rename certbot-dns-route53/{ => certbot_dns_route53/_internal}/tests/dns_route53_test.py (100%) create mode 100644 certbot-dns-sakuracloud/certbot_dns_sakuracloud/_internal/tests/__init__.py rename certbot-dns-sakuracloud/{ => certbot_dns_sakuracloud/_internal}/tests/dns_sakuracloud_test.py (100%) diff --git a/certbot-dns-cloudflare/MANIFEST.in b/certbot-dns-cloudflare/MANIFEST.in index 696da3eeb..40765a39d 100644 --- a/certbot-dns-cloudflare/MANIFEST.in +++ b/certbot-dns-cloudflare/MANIFEST.in @@ -1,7 +1,6 @@ include LICENSE.txt include README.rst recursive-include docs * -recursive-include tests * include certbot_dns_cloudflare/py.typed global-exclude __pycache__ global-exclude *.py[cod] diff --git a/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/tests/__init__.py b/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/tests/__init__.py new file mode 100644 index 000000000..9edaeaa70 --- /dev/null +++ b/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/tests/__init__.py @@ -0,0 +1 @@ +"""certbot-dns-cloudflare tests""" diff --git a/certbot-dns-cloudflare/tests/dns_cloudflare_test.py b/certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/tests/dns_cloudflare_test.py similarity index 100% rename from certbot-dns-cloudflare/tests/dns_cloudflare_test.py rename to certbot-dns-cloudflare/certbot_dns_cloudflare/_internal/tests/dns_cloudflare_test.py 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-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-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-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-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-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-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-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-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-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/_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-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-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 From c987c3f3aae14231063770e978399f8689c59309 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 28 Mar 2023 15:23:16 -0700 Subject: [PATCH 12/23] remove boulder-integration.conf.sh (#9640) --- .../tests/boulder-integration.conf.sh | 107 ------------------ 1 file changed, 107 deletions(-) delete mode 100755 certbot-nginx/certbot_nginx/_internal/tests/boulder-integration.conf.sh diff --git a/certbot-nginx/certbot_nginx/_internal/tests/boulder-integration.conf.sh b/certbot-nginx/certbot_nginx/_internal/tests/boulder-integration.conf.sh deleted file mode 100755 index 35cedf5ed..000000000 --- a/certbot-nginx/certbot_nginx/_internal/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 < Date: Tue, 28 Mar 2023 15:29:08 -0700 Subject: [PATCH 13/23] add changelog entry (#9641) --- certbot/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index 7fd4800e8..e429d80c3 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -18,6 +18,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). [GetChange API](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html) to determine if a DNS update is complete. The flag has never had any effect and will be removed in a future version of Certbot. +* Packaged tests for all Certbot components besides josepy were moved inside + the `_internal/tests` module. ### Fixed From 608d731e2b1cbb621cfe6d13ed0c2e72ec3a2de5 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Thu, 30 Mar 2023 15:20:44 -0700 Subject: [PATCH 14/23] Make mypy pass on our tests (#9648) * make mypy pass on our tests * fix grammar --- .../apache-conf-files/apache-conf-test-pebble.py | 5 ++--- certbot-nginx/certbot_nginx/_internal/parser_obj.py | 3 ++- .../certbot_nginx/_internal/tests/http_01_test.py | 13 +++++++------ .../_internal/tests/parser_obj_test.py | 3 +++ .../certbot/_internal/tests/plugins/common_test.py | 5 +++-- certbot/certbot/_internal/tests/util_test.py | 11 ++--------- mypy.ini | 12 +++++++++--- 7 files changed, 28 insertions(+), 24 deletions(-) diff --git a/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py b/certbot-apache/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py index 68bd6287d..383c652f8 100755 --- a/certbot-apache/certbot_apache/_internal/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-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/http_01_test.py b/certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py index 6726b85ad..c81357607 100644 --- a/certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py +++ b/certbot-nginx/certbot_nginx/_internal/tests/http_01_test.py @@ -7,6 +7,7 @@ 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 @@ -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? str: - pass + return "info" @classmethod def add_parser_arguments(cls, add): diff --git a/certbot/certbot/_internal/tests/util_test.py b/certbot/certbot/_internal/tests/util_test.py index ac3b5ab88..b4256176e 100644 --- a/certbot/certbot/_internal/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: diff --git a/mypy.ini b/mypy.ini index 6c01929d4..2c9ba5187 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,8 +1,14 @@ [mypy] -# Removing this exclude setting is being tracked by -# https://github.com/certbot/certbot/issues/7909. -exclude = .*/_internal/tests/ 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 From 097af18417020d9108bda4f09685dddac26a0039 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Thu, 30 Mar 2023 16:02:12 -0700 Subject: [PATCH 15/23] remove readlink (#9649) --- tools/pip_install.py | 4 +--- tools/readlink.py | 17 ----------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100755 tools/readlink.py diff --git a/tools/pip_install.py b/tools/pip_install.py index c46fa8758..2f401e6da 100755 --- a/tools/pip_install.py +++ b/tools/pip_install.py @@ -11,11 +11,9 @@ 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): 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])) From 1bd6bef42f2a1f245bdcccd899c975f96d52673f Mon Sep 17 00:00:00 2001 From: Bishop Clark Date: Sat, 1 Apr 2023 18:15:08 -0700 Subject: [PATCH 16/23] Update __init__.py (#9653) Removed two en_US meta-commas to cure the spliced sentences. --- certbot-dns-rfc2136/certbot_dns_rfc2136/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From df85c25da824ffd284a0d0b83ff4d9e2f60f4c82 Mon Sep 17 00:00:00 2001 From: alexzorin Date: Tue, 4 Apr 2023 03:20:22 +1000 Subject: [PATCH 17/23] add dns_route53_propagation_seconds to DEPRECATED_OPTIONS (#9652) Fixes #9651. --- certbot/certbot/_internal/cli/cli_constants.py | 2 ++ 1 file changed, 2 insertions(+) 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" } From 10ba4ea349f745c0530f7949bb36c6b57bd7c0db Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 4 Apr 2023 08:06:41 -0700 Subject: [PATCH 18/23] Update changelog for 2.5.0 release --- certbot/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index e429d80c3..4a66ea5c9 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -2,7 +2,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). -## 2.5.0 - master +## 2.5.0 - 2023-04-04 ### Added From 3c667e8fffc2f6f4304f284ea52531bbf750a6c4 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 4 Apr 2023 08:07:49 -0700 Subject: [PATCH 19/23] Release 2.5.0 --- acme/setup.py | 2 +- certbot-apache/setup.py | 2 +- certbot-compatibility-test/setup.py | 2 +- certbot-dns-cloudflare/setup.py | 2 +- certbot-dns-digitalocean/setup.py | 2 +- certbot-dns-dnsimple/setup.py | 2 +- certbot-dns-dnsmadeeasy/setup.py | 2 +- certbot-dns-gehirn/setup.py | 2 +- certbot-dns-google/setup.py | 2 +- certbot-dns-linode/setup.py | 2 +- certbot-dns-luadns/setup.py | 2 +- certbot-dns-nsone/setup.py | 2 +- certbot-dns-ovh/setup.py | 2 +- certbot-dns-rfc2136/setup.py | 2 +- certbot-dns-route53/setup.py | 2 +- certbot-dns-sakuracloud/setup.py | 2 +- certbot-nginx/setup.py | 2 +- certbot/certbot/__init__.py | 2 +- certbot/docs/cli-help.txt | 44 ++++++++++++++++------------- 19 files changed, 42 insertions(+), 38 deletions(-) diff --git a/acme/setup.py b/acme/setup.py index 26ff4b7d7..94e1f80c5 100644 --- a/acme/setup.py +++ b/acme/setup.py @@ -3,7 +3,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.5.0' install_requires = [ 'cryptography>=2.5.0', diff --git a/certbot-apache/setup.py b/certbot-apache/setup.py index 5f8f86292..37e9ceaae 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.5.0' install_requires = [ # We specify the minimum acme and certbot version as the current plugin diff --git a/certbot-compatibility-test/setup.py b/certbot-compatibility-test/setup.py index 43014a78d..561284944 100644 --- a/certbot-compatibility-test/setup.py +++ b/certbot-compatibility-test/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.5.0' install_requires = [ 'certbot', diff --git a/certbot-dns-cloudflare/setup.py b/certbot-dns-cloudflare/setup.py index 1af4e4296..f42c2688b 100644 --- a/certbot-dns-cloudflare/setup.py +++ b/certbot-dns-cloudflare/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.5.0' install_requires = [ 'cloudflare>=1.5.1', diff --git a/certbot-dns-digitalocean/setup.py b/certbot-dns-digitalocean/setup.py index 34a420f8a..eee76f618 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.5.0' install_requires = [ 'python-digitalocean>=1.11', # 1.15.0 or newer is recommended for TTL support diff --git a/certbot-dns-dnsimple/setup.py b/certbot-dns-dnsimple/setup.py index b0ba741e8..10f7708f1 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.5.0' install_requires = [ # This version of lexicon is required to address the problem described in diff --git a/certbot-dns-dnsmadeeasy/setup.py b/certbot-dns-dnsmadeeasy/setup.py index 46964739d..f9cd204f5 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.5.0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-gehirn/setup.py b/certbot-dns-gehirn/setup.py index 8f8ecac5e..3a48000b1 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.5.0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-google/setup.py b/certbot-dns-google/setup.py index 2b5a454e5..6115246d2 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.5.0' install_requires = [ 'google-api-python-client>=1.5.5', diff --git a/certbot-dns-linode/setup.py b/certbot-dns-linode/setup.py index fea7ed60c..5f913c32f 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.5.0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-luadns/setup.py b/certbot-dns-luadns/setup.py index d20499b00..5a17c8ee2 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.5.0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-nsone/setup.py b/certbot-dns-nsone/setup.py index 61e64de65..3119db108 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.5.0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-ovh/setup.py b/certbot-dns-ovh/setup.py index 1d1647541..2e666e2b2 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.5.0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-rfc2136/setup.py b/certbot-dns-rfc2136/setup.py index 29d63ce62..79ab51aa7 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.5.0' install_requires = [ 'dnspython>=1.15.0', diff --git a/certbot-dns-route53/setup.py b/certbot-dns-route53/setup.py index 2be7d62fb..b9b433d68 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.5.0' install_requires = [ 'boto3>=1.15.15', diff --git a/certbot-dns-sakuracloud/setup.py b/certbot-dns-sakuracloud/setup.py index 777c00318..622e10dd3 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.5.0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-nginx/setup.py b/certbot-nginx/setup.py index 6a0da5b74..96c49b30a 100644 --- a/certbot-nginx/setup.py +++ b/certbot-nginx/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -version = '2.5.0.dev0' +version = '2.5.0' install_requires = [ # We specify the minimum acme and certbot version as the current plugin diff --git a/certbot/certbot/__init__.py b/certbot/certbot/__init__.py index ac0583076..f26a25762 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.5.0' 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). From 86c51acb91611cb1ef73a27878f930768b4b68d4 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 4 Apr 2023 08:07:50 -0700 Subject: [PATCH 20/23] Add contents to certbot/CHANGELOG.md for next version --- certbot/CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index 4a66ea5c9..3a9221f42 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -2,6 +2,22 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). +## 2.6.0 - master + +### Added + +* + +### Changed + +* + +### Fixed + +* + +More details about these changes can be found on our GitHub repo. + ## 2.5.0 - 2023-04-04 ### Added From 1fe201e320a1f3b2b69dac35f6ef1ad1b315c81d Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 4 Apr 2023 08:07:50 -0700 Subject: [PATCH 21/23] Bump version to 2.6.0 --- acme/docs/jws-help.txt | 2 +- acme/setup.py | 2 +- certbot-apache/setup.py | 2 +- certbot-compatibility-test/setup.py | 2 +- certbot-dns-cloudflare/setup.py | 2 +- certbot-dns-digitalocean/setup.py | 2 +- certbot-dns-dnsimple/setup.py | 2 +- certbot-dns-dnsmadeeasy/setup.py | 2 +- certbot-dns-gehirn/setup.py | 2 +- certbot-dns-google/setup.py | 2 +- certbot-dns-linode/setup.py | 2 +- certbot-dns-luadns/setup.py | 2 +- certbot-dns-nsone/setup.py | 2 +- certbot-dns-ovh/setup.py | 2 +- certbot-dns-rfc2136/setup.py | 2 +- certbot-dns-route53/setup.py | 2 +- certbot-dns-sakuracloud/setup.py | 2 +- certbot-nginx/setup.py | 2 +- certbot/certbot/__init__.py | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) 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 94e1f80c5..6856dff98 100644 --- a/acme/setup.py +++ b/acme/setup.py @@ -3,7 +3,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0' +version = '2.6.0.dev0' install_requires = [ 'cryptography>=2.5.0', diff --git a/certbot-apache/setup.py b/certbot-apache/setup.py index 37e9ceaae..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' +version = '2.6.0.dev0' install_requires = [ # We specify the minimum acme and certbot version as the current plugin diff --git a/certbot-compatibility-test/setup.py b/certbot-compatibility-test/setup.py index 561284944..e7510b6cd 100644 --- a/certbot-compatibility-test/setup.py +++ b/certbot-compatibility-test/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -version = '2.5.0' +version = '2.6.0.dev0' install_requires = [ 'certbot', diff --git a/certbot-dns-cloudflare/setup.py b/certbot-dns-cloudflare/setup.py index f42c2688b..124fc0c08 100644 --- a/certbot-dns-cloudflare/setup.py +++ b/certbot-dns-cloudflare/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import find_packages from setuptools import setup -version = '2.5.0' +version = '2.6.0.dev0' install_requires = [ 'cloudflare>=1.5.1', diff --git a/certbot-dns-digitalocean/setup.py b/certbot-dns-digitalocean/setup.py index eee76f618..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' +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/setup.py b/certbot-dns-dnsimple/setup.py index 10f7708f1..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' +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/setup.py b/certbot-dns-dnsmadeeasy/setup.py index f9cd204f5..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' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-gehirn/setup.py b/certbot-dns-gehirn/setup.py index 3a48000b1..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' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-google/setup.py b/certbot-dns-google/setup.py index 6115246d2..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' +version = '2.6.0.dev0' install_requires = [ 'google-api-python-client>=1.5.5', diff --git a/certbot-dns-linode/setup.py b/certbot-dns-linode/setup.py index 5f913c32f..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' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-luadns/setup.py b/certbot-dns-luadns/setup.py index 5a17c8ee2..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' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-nsone/setup.py b/certbot-dns-nsone/setup.py index 3119db108..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' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-ovh/setup.py b/certbot-dns-ovh/setup.py index 2e666e2b2..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' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-dns-rfc2136/setup.py b/certbot-dns-rfc2136/setup.py index 79ab51aa7..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' +version = '2.6.0.dev0' install_requires = [ 'dnspython>=1.15.0', diff --git a/certbot-dns-route53/setup.py b/certbot-dns-route53/setup.py index b9b433d68..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' +version = '2.6.0.dev0' install_requires = [ 'boto3>=1.15.15', diff --git a/certbot-dns-sakuracloud/setup.py b/certbot-dns-sakuracloud/setup.py index 622e10dd3..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' +version = '2.6.0.dev0' install_requires = [ 'dns-lexicon>=3.2.1', diff --git a/certbot-nginx/setup.py b/certbot-nginx/setup.py index 96c49b30a..59be22298 100644 --- a/certbot-nginx/setup.py +++ b/certbot-nginx/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -version = '2.5.0' +version = '2.6.0.dev0' install_requires = [ # We specify the minimum acme and certbot version as the current plugin diff --git a/certbot/certbot/__init__.py b/certbot/certbot/__init__.py index f26a25762..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' +__version__ = '2.6.0.dev0' From a78073812cd414a90fdd10af127b92cd52fd3ab8 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Wed, 5 Apr 2023 16:43:26 -0700 Subject: [PATCH 22/23] Always "pipstrap" when running pip_install.py (#9658) Fixes https://github.com/certbot/certbot/issues/7921. In all cases when we run `pip_install.py`, we first run `pipstrap.py`. This PR combines these two steps for convenience and to make always doing that less error prone. This will also help me with some of the `tox.ini` refactoring I'm planning to do. I ran the full test suite on everything and tested the release script changes locally. This change shouldn't have any effect on cryptography's setup because they install `certbot[test]` which depends on pip, setuptools, and wheel. * always pipstrap * use pip_install.py during releases --- .../templates/jobs/packaging-jobs.yml | 4 -- .../templates/steps/tox-steps.yml | 1 - tools/_release.sh | 10 +--- tools/docker/core/Dockerfile | 1 - tools/pip_install.py | 56 ++++++++++++------- tools/pip_install_editable.py | 5 -- tools/pipstrap.py | 2 +- tools/venv.py | 1 - tox.ini | 1 - 9 files changed, 39 insertions(+), 42 deletions(-) diff --git a/.azure-pipelines/templates/jobs/packaging-jobs.yml b/.azure-pipelines/templates/jobs/packaging-jobs.yml index cd2a08886..d8c7beafa 100644 --- a/.azure-pipelines/templates/jobs/packaging-jobs.yml +++ b/.azure-pipelines/templates/jobs/packaging-jobs.yml @@ -62,7 +62,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: | @@ -99,7 +98,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 @@ -171,7 +169,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 @@ -209,7 +206,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 b7027177b..a993677b1 100644 --- a/.azure-pipelines/templates/steps/tox-steps.yml +++ b/.azure-pipelines/templates/steps/tox-steps.yml @@ -30,7 +30,6 @@ steps: addToPath: true - bash: | set -e - python3 tools/pipstrap.py python3 tools/pip_install.py tox displayName: Install runtime dependencies - task: DownloadSecureFile@1 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/core/Dockerfile b/tools/docker/core/Dockerfile index 911e7796a..943d9f51c 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -40,7 +40,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/pip_install.py b/tools/pip_install.py index 2f401e6da..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,43 +16,52 @@ from __future__ import print_function import os import subprocess import sys -import tempfile def find_tools_path(): 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: - 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/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 04652a4a1..de98c3e25 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,6 @@ source_paths = acme/acme certbot/certbot certbot-apache/certbot_apache certbot-c 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} From 7a68b2914007133ca517b0e5d945a45db7f5212b Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Thu, 6 Apr 2023 17:28:17 -0700 Subject: [PATCH 23/23] update min cryptography (#9663) --- acme/setup.py | 2 +- certbot/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acme/setup.py b/acme/setup.py index 6856dff98..904ab162f 100644 --- a/acme/setup.py +++ b/acme/setup.py @@ -6,7 +6,7 @@ from setuptools import setup version = '2.6.0.dev0' install_requires = [ - 'cryptography>=2.5.0', + 'cryptography>=3.2.1', 'josepy>=1.13.0', # pyOpenSSL 23.1.0 is a bad release: https://github.com/pyca/pyopenssl/issues/1199 'PyOpenSSL>=17.5.0,!=23.1.0', 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',