URL: https://github.com/freeipa/freeipa/pull/967
Author: tomaskrizek
 Title: #967: Backport PR 958 to ipa-4-5
Action: opened

PR body:
"""
This PR was opened automatically because PR #958 was pushed to master and 
backport to ipa-4-5 is required.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/967/head:pr967
git checkout pr967
From 48a313f5f7272b73c85ed047c88ef83ac7847c55 Mon Sep 17 00:00:00 2001
From: Michal Reznik <mrez...@redhat.com>
Date: Thu, 10 Aug 2017 15:09:39 +0200
Subject: [PATCH 1/2] test_caless: add server_replica ca-less to ca-full test

Add server_replica ca-less to ca-full test as we are currently missing
one. Cover Pagure issue: https://pagure.io/freeipa/issue/6207

https://pagure.io/freeipa/issue/7086
---
 ipatests/test_integration/test_caless.py | 39 ++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py
index 813294f943..59dd60fa2d 100644
--- a/ipatests/test_integration/test_caless.py
+++ b/ipatests/test_integration/test_caless.py
@@ -1507,6 +1507,7 @@ def test_ds_old_options(self):
 
 
 class TestPKINIT(CALessBase):
+    """Install master and replica with PKINIT"""
     num_replicas = 1
 
     @classmethod
@@ -1528,3 +1529,41 @@ def test_server_replica_install_pkinit(self):
                                       pkinit_pin=_DEFAULT)
         assert result.returncode == 0
         self.verify_installation()
+
+
+class TestServerReplicaCALessToCAFull(CALessBase):
+    """
+    Test server and replica caless to cafull scenario:
+    Master (caless) / replica (caless) >> master (ca) / replica (ca)
+    """
+    num_replicas = 1
+
+    def test_install_caless_server_replica(self):
+        """Install CA-less master and replica"""
+
+        self.create_pkcs12('ca1/server')
+        self.prepare_cacert('ca1')
+
+        master = self.install_server()
+        assert master.returncode == 0
+
+        self.create_pkcs12('ca1/replica', filename='replica.p12')
+
+        replica = self.prepare_replica()
+        assert replica.returncode == 0
+
+    def test_server_ipa_ca_install(self):
+        """Install CA on master"""
+
+        ca_master = tasks.install_ca(self.master)
+        assert ca_master.returncode == 0
+        cert_update_master = self.master.run_command(['ipa-certupdate'])
+        assert cert_update_master.returncode == 0
+        cert_update_replica = self.replicas[0].run_command(['ipa-certupdate'])
+        assert cert_update_replica.returncode == 0
+
+    def test_replica_ipa_ca_install(self):
+        """Install CA on replica"""
+
+        ca_replica = tasks.install_ca(self.replicas[0])
+        assert ca_replica.returncode == 0

From 2ffbc973d6fcabd60643c0116ea271f73b2a82c9 Mon Sep 17 00:00:00 2001
From: Michal Reznik <mrez...@redhat.com>
Date: Thu, 10 Aug 2017 15:11:53 +0200
Subject: [PATCH 2/2] test_caless: add replica ca-less to ca-full test (master
 caless)

Add replica ca-less to ca-full test when master stays caless. Cover
Pagure issue: https://pagure.io/freeipa/issue/6226

https://pagure.io/freeipa/issue/7086
---
 ipatests/test_integration/test_caless.py | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py
index 59dd60fa2d..4ad7f696f5 100644
--- a/ipatests/test_integration/test_caless.py
+++ b/ipatests/test_integration/test_caless.py
@@ -1567,3 +1567,31 @@ def test_replica_ipa_ca_install(self):
 
         ca_replica = tasks.install_ca(self.replicas[0])
         assert ca_replica.returncode == 0
+
+
+class TestReplicaCALessToCAFull(CALessBase):
+    """
+    Test replica caless to cafull when master stays caless scenario:
+    Master (caless) / replica (caless) >> replica (ca)
+    """
+    num_replicas = 1
+
+    def test_install_caless_server_replica(self):
+        """Install CA-less master and replica"""
+
+        self.create_pkcs12('ca1/server')
+        self.prepare_cacert('ca1')
+
+        master = self.install_server()
+        assert master.returncode == 0
+
+        self.create_pkcs12('ca1/replica', filename='replica.p12')
+
+        replica = self.prepare_replica()
+        assert replica.returncode == 0
+
+    def test_replica_ipa_ca_install(self):
+        """Install CA on replica (master caless)"""
+
+        ca_replica = tasks.install_ca(self.replicas[0])
+        assert ca_replica.returncode == 0
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to