mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Remove duplicate route53 options (#6405)
* Remove duplicate route53 options Duplicate route53 option (certbot-route53:auth) removed. * Remove duplicate route53 options from help Removed duplicate route53 options from help by adding a couple of if statements in cli.py. * Fix formatting * Use cleaner solution to remove duplicate route53 options from help Used a cleaner method to remove the duplicate option from the help text * Fix line too long * Add regression test Added a regression test and fixed a couple of minor issues. * Fix trailing whitespace * Add missing newline * Put newline in correct place
This commit is contained in:
@@ -859,7 +859,9 @@ class HelpfulArgumentParser(object):
|
||||
if chosen_topic == "everything":
|
||||
chosen_topic = "run"
|
||||
if chosen_topic == "all":
|
||||
return dict([(t, True) for t in self.help_topics])
|
||||
# Addition of condition closes #6209 (removal of duplicate route53 option).
|
||||
return dict([(t, True) if t != 'certbot-route53:auth' else (t, False)
|
||||
for t in self.help_topics])
|
||||
elif not chosen_topic:
|
||||
return dict([(t, False) for t in self.help_topics])
|
||||
else:
|
||||
|
||||
@@ -431,6 +431,11 @@ class ParseTest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
||||
self.assertRaises(errors.Error, self.parse,
|
||||
"--allow-subset-of-names -d *.example.org".split())
|
||||
|
||||
def test_route53_no_revert(self):
|
||||
for help_flag in ['-h', '--help']:
|
||||
for topic in ['all', 'plugins', 'dns-route53']:
|
||||
self.assertFalse('certbot-route53:auth' in self._help_output([help_flag, topic]))
|
||||
|
||||
|
||||
class DefaultTest(unittest.TestCase):
|
||||
"""Tests for certbot.cli._Default."""
|
||||
|
||||
Reference in New Issue
Block a user