URL: https://github.com/freeipa/freeipa/pull/1266 Author: Rezney Title: #1266: test_caless: fix fix http.p12 is not valid and provide domain_level for replica tests Action: opened
PR body: """ """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1266/head:pr1266 git checkout pr1266
From 5a373ef6ff561cf6e1bc45a9c2392e3807cbc12e Mon Sep 17 00:00:00 2001 From: Michal Reznik <mrez...@redhat.com> Date: Thu, 9 Nov 2017 18:22:17 +0100 Subject: [PATCH 1/2] test_caless: fix TypeError on domain_level compare Fixes an error where we were getting domain_level None and after switching to Py3 we hit TypeError because of comparing None and int. --- ipatests/test_integration/test_caless.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index eccc9967db..e18c084e1b 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -796,6 +796,7 @@ def install(cls, mh): cls.prepare_cacert('ca1') result = cls.install_server() assert result.returncode == 0 + cls.domain_level = tasks.domainlevel(cls.master) @replica_install_teardown def test_no_certs(self): From 2d45f3ff8b0cef04f0a932bd038137a462443797 Mon Sep 17 00:00:00 2001 From: Michal Reznik <mrez...@redhat.com> Date: Thu, 9 Nov 2017 19:59:34 +0100 Subject: [PATCH 2/2] test_caless: fix http.p12 is not valid In test_invalid_ds_cn test is used old invalid http.p12 cert as leftover after previous test_invalid_http_cn test. Also use server-badname cert instead of cert for replica. --- ipatests/test_integration/test_caless.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index e18c084e1b..4bf9acb162 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -523,7 +523,8 @@ def test_invalid_http_cn(self): def test_invalid_ds_cn(self): "IPA server install with DS certificate with invalid CN" - self.create_pkcs12('ca1/replica', filename='dirsrv.p12') + self.create_pkcs12('ca1/server', filename='http.p12') + self.create_pkcs12('ca1/server-badname', filename='dirsrv.p12') self.prepare_cacert('ca1') result = self.install_server(http_pkcs12='http.p12',
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org