mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 22:33:00 -04:00
Add basic integration tests
This commit is contained in:
parent
44154708d9
commit
7427daaa6c
1 changed files with 21 additions and 0 deletions
|
|
@ -813,6 +813,27 @@ def test_revoke_multiple_lineages(context: IntegrationTestsContext) -> None:
|
|||
assert 'Not deleting revoked certificates due to overlapping archive dirs' in f.read()
|
||||
|
||||
|
||||
def test_reconfigure(context: IntegrationTestsContext) -> None:
|
||||
"""Test the reconfigure verb"""
|
||||
certname = context.get_domain()
|
||||
context.certbot(['-d', certname])
|
||||
conf_path = join(context.config_dir, 'renewal', '{}.conf'.format(certname))
|
||||
|
||||
# Test changing configurator
|
||||
context.certbot(['reconfigure', '--cert-name', certname, '--nginx'])
|
||||
with open(conf_path, 'r') as f:
|
||||
assert 'authenticator = nginx' in f.read(), \
|
||||
'Expected authenticator to be changed to nginx in renewal config'
|
||||
assert 'installer = nginx' in f.read(), \
|
||||
'Expected installer to be changed to nginx in renewal config'
|
||||
|
||||
# Test adding new hook
|
||||
context.certbot(['reconfigure', '--cert-name', certname, '--pre-hook', '"echo new pre hook"'])
|
||||
with open(conf_path, 'r') as f:
|
||||
assert 'pre_hook = echo new pre hook' in f.read(), \
|
||||
'Expected new pre hook to added in renewal config'
|
||||
|
||||
|
||||
def test_wildcard_certificates(context: IntegrationTestsContext) -> None:
|
||||
"""Test wildcard certificate issuance."""
|
||||
certname = context.get_domain('wild')
|
||||
|
|
|
|||
Loading…
Reference in a new issue