mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
test_cert_plugin: check if SAN is added with default profile
https://pagure.io/freeipa/issue/7334 Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
cf2d171d0c
commit
65c592334a
@@ -224,16 +224,14 @@ class test_cert(BaseCert):
|
|||||||
assert 'valid_not_before' in res
|
assert 'valid_not_before' in res
|
||||||
assert 'valid_not_after' in res
|
assert 'valid_not_after' in res
|
||||||
|
|
||||||
def test_00010_cleanup(self):
|
def test_00010_san_in_cert(self):
|
||||||
"""
|
"""
|
||||||
Clean up cert test data
|
Test if SAN extension is automatically added with default profile.
|
||||||
"""
|
"""
|
||||||
# Now clean things up
|
csr = self.generateCSR(str(self.subject))
|
||||||
api.Command['host_del'](self.host_fqdn)
|
res = api.Command[
|
||||||
|
'cert_request'](csr, principal=self.service_princ)['result']
|
||||||
# Verify that the service is gone
|
assert 'san_dnsname' in res
|
||||||
res = api.Command['service_find'](self.service_princ)
|
|
||||||
assert res['count'] == 0
|
|
||||||
|
|
||||||
def test_00011_emails_are_valid(self):
|
def test_00011_emails_are_valid(self):
|
||||||
"""
|
"""
|
||||||
@@ -258,6 +256,17 @@ class test_cert(BaseCert):
|
|||||||
result = _emails_are_valid(email_addrs, [])
|
result = _emails_are_valid(email_addrs, [])
|
||||||
assert False == result, result
|
assert False == result, result
|
||||||
|
|
||||||
|
def test_99999_cleanup(self):
|
||||||
|
"""
|
||||||
|
Clean up cert test data
|
||||||
|
"""
|
||||||
|
# Now clean things up
|
||||||
|
api.Command['host_del'](self.host_fqdn)
|
||||||
|
|
||||||
|
# Verify that the service is gone
|
||||||
|
res = api.Command['service_find'](self.service_princ)
|
||||||
|
assert res['count'] == 0
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.tier1
|
@pytest.mark.tier1
|
||||||
class test_cert_find(XMLRPC_test):
|
class test_cert_find(XMLRPC_test):
|
||||||
|
|||||||
Reference in New Issue
Block a user