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