mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Fix more certbot_apache/certbot_nginx paths
This commit is contained in:
parent
3e05ce27b2
commit
593f5ae044
8 changed files with 26 additions and 14 deletions
|
|
@ -51,7 +51,7 @@ ignore=CVS
|
|||
# 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/
|
||||
ignore-paths=.*/_internal/tests/,.*/apache/tests,.*/nginx/tests
|
||||
|
||||
# Files or directories matching the regular expression patterns are skipped.
|
||||
# The regex matches against base names, not paths. The default value ignores
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
# Avoid false warnings because certbot packages are not installed in the thread that executes
|
||||
# the coverage: indeed, certbot is launched as a CLI from a subprocess.
|
||||
disable_warnings = module-not-imported,no-data-collected
|
||||
omit = **/*_test.py,**/tests/*,**/dns_common*,**/certbot_nginx/_internal/parser_obj.py
|
||||
omit = **/*_test.py,**/tests/*,**/dns_common*,**/certbot/_internal/nginx/parser_obj.py
|
||||
patch = subprocess
|
||||
parallel = True
|
||||
|
||||
[report]
|
||||
# Exclude unit tests in coverage during integration tests.
|
||||
omit = **/*_test.py,**/tests/*,**/dns_common*,**/certbot_nginx/_internal/parser_obj.py
|
||||
omit = **/*_test.py,**/tests/*,**/dns_common*,**/certbot/_internal/nginx/parser_obj.py
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Right now, this is data for the roundtrip test (checking that the parser
|
|||
can parse each file and that the reserialized config file it generates is
|
||||
identical to the original).
|
||||
|
||||
If run in a virtualenv or otherwise so that certbot_nginx can be imported,
|
||||
If run in a virtualenv or otherwise so that certbot can be imported,
|
||||
the roundtrip test can run as
|
||||
|
||||
python roundtrip.py nginx-roundtrip-testdata
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from certbot_nginx._internal import nginxparser
|
||||
from certbot._internal.apache import nginxparser
|
||||
|
||||
|
||||
def roundtrip(stuff):
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from unittest import mock
|
|||
from certbot import configuration
|
||||
from certbot import errors as le_errors
|
||||
from certbot import util as certbot_util
|
||||
from certbot_apache._internal import entrypoint
|
||||
from certbot._internal.apache import entrypoint
|
||||
from certbot_compatibility_test import errors
|
||||
from certbot_compatibility_test import util
|
||||
from certbot_compatibility_test.configurators import common as configurators_common
|
||||
|
|
@ -24,7 +24,7 @@ class Proxy(configurators_common.Proxy):
|
|||
|
||||
self.modules = self.server_root = self.test_conf = self.version = None
|
||||
patch = mock.patch(
|
||||
"certbot_apache._internal.configurator.display_ops.select_vhost")
|
||||
"certbot._internal.apache.configurator.display_ops.select_vhost")
|
||||
mock_display = patch.start()
|
||||
mock_display.side_effect = le_errors.PluginError(
|
||||
"Unable to determine vhost")
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from certbot import configuration
|
|||
from certbot_compatibility_test import errors
|
||||
from certbot_compatibility_test import util
|
||||
from certbot_compatibility_test.configurators import common as configurators_common
|
||||
from certbot_nginx._internal import configurator
|
||||
from certbot_nginx._internal import constants
|
||||
from certbot._internal.nginx import configurator
|
||||
from certbot._internal.nginx import constants
|
||||
|
||||
|
||||
class Proxy(configurators_common.Proxy):
|
||||
|
|
|
|||
12
mypy.ini
12
mypy.ini
|
|
@ -13,3 +13,15 @@ strict_equality = True
|
|||
# this "error" code removes this visual noise.
|
||||
disable_error_code = annotation-unchecked
|
||||
disallow_untyped_defs = False
|
||||
[mypy-*.apache.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
|
||||
[mypy-*.nginx.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
|
||||
|
|
|
|||
10
tox.ini
10
tox.ini
|
|
@ -166,27 +166,27 @@ deps =
|
|||
-e certbot
|
||||
-e certbot-apache
|
||||
commands =
|
||||
{toxinidir}/certbot-apache/src/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test --debian-modules
|
||||
{toxinidir}/certbot-apache/src/certbot/_internal/apache/tests/apache-conf-files/apache-conf-test --debian-modules
|
||||
passenv =
|
||||
SERVER
|
||||
allowlist_externals =
|
||||
{toxinidir}/certbot-apache/src/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test
|
||||
{toxinidir}/certbot-apache/src/certbot/_internal/apache/tests/apache-conf-files/apache-conf-test
|
||||
|
||||
[testenv:apacheconftest-external-with-pebble]
|
||||
description = Run apacheconftest with pebble and Certbot outside of the tox virtual environment.
|
||||
deps =
|
||||
-e certbot-ci
|
||||
allowlist_externals =
|
||||
{toxinidir}/certbot-apache/src/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py
|
||||
{toxinidir}/certbot-apache/src/certbot/_internal/apache/tests/apache-conf-files/apache-conf-test-pebble.py
|
||||
commands =
|
||||
{toxinidir}/certbot-apache/src/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py --debian-modules
|
||||
{toxinidir}/certbot-apache/src/certbot/_internal/apache/tests/apache-conf-files/apache-conf-test-pebble.py --debian-modules
|
||||
|
||||
[testenv:apacheconftest-with-pebble]
|
||||
deps =
|
||||
{[testenv:apacheconftest]deps}
|
||||
{[testenv:apacheconftest-external-with-pebble]deps}
|
||||
allowlist_externals =
|
||||
{toxinidir}/certbot-apache/src/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py
|
||||
{toxinidir}/certbot-apache/src/certbot/_internal/apache/tests/apache-conf-files/apache-conf-test-pebble.py
|
||||
commands = {[testenv:apacheconftest-external-with-pebble]commands}
|
||||
|
||||
[testenv:nginxroundtrip]
|
||||
|
|
|
|||
Loading…
Reference in a new issue