mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:19 +02:00
Dropped deprecated flags from commands (#7482)
This pull request addresses #7451 by removing the deprecated flags. * Dropped deprecated flags from commands * Updated changelog for dropped flags and deleted outdated tests * removed init-script part of apache test
This commit is contained in:
committed by
Brad Warren
parent
fffa74edb2
commit
1c05b9bd07
@@ -26,6 +26,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||
* CLI flags --tls-sni-01-port and --tls-sni-01-address have been removed.
|
||||
* The values tls-sni and tls-sni-01 for the --preferred-challenges flag are no
|
||||
longer accepted.
|
||||
* Removed the flags: `--agree-dev-preview`, `--dialog`, and `--apache-init-script`
|
||||
* acme.standalone.BaseRequestHandlerWithLogging and
|
||||
acme.standalone.simple_tls_sni_01_server have been deprecated and will be
|
||||
removed in a future release of the library.
|
||||
|
||||
@@ -174,8 +174,6 @@ class ApacheConfigurator(common.Installer):
|
||||
"(Only Ubuntu/Debian currently)")
|
||||
add("ctl", default=DEFAULTS["ctl"],
|
||||
help="Full path to Apache control script")
|
||||
util.add_deprecated_argument(
|
||||
add, argument_name="init-script", nargs=1)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Initialize an Apache Configurator.
|
||||
|
||||
@@ -108,13 +108,9 @@ class MultipleVhostsTest(util.ApacheTest):
|
||||
exp[k.replace("_", "-")] = ApacheConfigurator.OS_DEFAULTS[k]
|
||||
# Special cases
|
||||
exp["vhost-root"] = None
|
||||
exp["init-script"] = None
|
||||
|
||||
found = set()
|
||||
for call in mock_add.call_args_list:
|
||||
# init-script is a special case: deprecated argument
|
||||
if call[0][0] != "init-script":
|
||||
self.assertEqual(exp[call[0][0]], call[1]['default'])
|
||||
found.add(call[0][0])
|
||||
|
||||
# Make sure that all (and only) the expected values exist
|
||||
|
||||
@@ -1246,9 +1246,6 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False): # pylint: dis
|
||||
default=flag_default("autorenew"), dest="autorenew",
|
||||
help="Disable auto renewal of certificates.")
|
||||
|
||||
helpful.add_deprecated_argument("--agree-dev-preview", 0)
|
||||
helpful.add_deprecated_argument("--dialog", 0)
|
||||
|
||||
# Populate the command line parameters for new style enhancements
|
||||
enhancements.populate_cli(helpful.add)
|
||||
|
||||
|
||||
@@ -265,16 +265,6 @@ class ParseTest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
||||
self.assertTrue(namespace.must_staple)
|
||||
self.assertTrue(namespace.staple)
|
||||
|
||||
def test_no_gui(self):
|
||||
args = ['renew', '--dialog']
|
||||
with mock.patch("certbot.util.logger.warning") as mock_warn:
|
||||
namespace = self.parse(args)
|
||||
|
||||
self.assertTrue(namespace.noninteractive_mode)
|
||||
self.assertEqual(mock_warn.call_count, 1)
|
||||
self.assertTrue("is deprecated" in mock_warn.call_args[0][0])
|
||||
self.assertEqual("--dialog", mock_warn.call_args[0][1])
|
||||
|
||||
def _check_server_conflict_message(self, parser_args, conflicting_args):
|
||||
try:
|
||||
self.parse(parser_args)
|
||||
|
||||
@@ -1381,11 +1381,6 @@ class MainTest(test_util.ConfigTestCase): # pylint: disable=too-many-public-met
|
||||
jose.ComparableX509(cert),
|
||||
mock.ANY)
|
||||
|
||||
def test_agree_dev_preview_config(self):
|
||||
with mock.patch('certbot.main.run') as mocked_run:
|
||||
self._call(['-c', test_util.vector_path('cli.ini')])
|
||||
self.assertTrue(mocked_run.called)
|
||||
|
||||
@mock.patch('certbot.log.post_arg_parse_setup')
|
||||
def test_register(self, _):
|
||||
with mock.patch('certbot.main.client') as mocked_client:
|
||||
|
||||
Reference in New Issue
Block a user