letsencrypt: On domain removal, don't revoke certificate, keep it

Closes: #2156.

Tests:

- Remove a domain from System -> Config, 'letsencrypt revoke' action is not
invoked.

- Triggering a manual revoke operation still leads to action getting triggered.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2021-12-06 18:25:20 -05:00
1 parent 4d73d7eb7f
commit b1740eee79
2 files changed
+16 -5

No files matched your search

@@ -69,6 +69,7 @@ def test_remove_domain(certificate_revoke, domain, revoke, result):
"""Test removing a domain that can certificates."""
assert result == on_domain_removed('test', 'domain-type-test', domain)
if revoke:
certificate_revoke.assert_has_calls([call(domain)])
certificate_revoke.assert_has_calls(
[call(domain, really_revoke=False)])
else:
certificate_revoke.assert_not_called()