URL: https://github.com/freeipa/freeipa/pull/1436 Author: tiran Title: #1436: [Backport][ipa-4-6] test_cert_plugin: check if SAN is added with default profile Action: opened
PR body: """ This PR was opened automatically because PR #1419 was pushed to master and backport to ipa-4-6 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1436/head:pr1436 git checkout pr1436
From 7faa23744aab38d74719489a94f2f41d7b7732e4 Mon Sep 17 00:00:00 2001 From: Michal Reznik <mrez...@redhat.com> Date: Wed, 20 Dec 2017 16:05:37 +0100 Subject: [PATCH] test_cert_plugin: check if SAN is added with default profile https://pagure.io/freeipa/issue/7334 --- ipatests/test_xmlrpc/test_cert_plugin.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py index 34c169b4c5..688c007ac6 100644 --- a/ipatests/test_xmlrpc/test_cert_plugin.py +++ b/ipatests/test_xmlrpc/test_cert_plugin.py @@ -224,16 +224,14 @@ def test_0009_cert_find(self): assert 'valid_not_before' 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 - 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 + csr = self.generateCSR(str(self.subject)) + res = api.Command[ + 'cert_request'](csr, principal=self.service_princ)['result'] + assert 'san_dnsname' in res def test_00011_emails_are_valid(self): """ @@ -258,6 +256,17 @@ def test_00011_emails_are_valid(self): result = _emails_are_valid(email_addrs, []) 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 class test_cert_find(XMLRPC_test):
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org