From 6064365aa09c9fcee01cb9be2bbe994adc361263 Mon Sep 17 00:00:00 2001 From: ndehadra Date: Fri, 13 Sep 2019 16:37:57 +0530 Subject: [PATCH] Hidden Replica: Add a test for Automatic CRL configuration Added test to check whether hidden replica can be configurred as CRL generation master. Related Tickets: https://pagure.io/freeipa/issue/7307 Signed-off-by: ndehadra Reviewed-By: Florence Blanc-Renaud --- .../test_replica_promotion.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 68240eb59..49a51f418 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -925,3 +925,28 @@ class TestHiddenReplicaPromotion(IntegrationTest): # FIXME: restore turns hidden replica into enabled replica self._check_config([self.master, self.replicas[0]]) self._check_server_role(self.replicas[0], 'enabled') + + def test_hidden_replica_automatic_crl(self): + """Exercises if automatic CRL configuration works with + hidden replica. + """ + # Demoting Replica to be hidden. + self.replicas[0].run_command([ + 'ipa', 'server-state', + self.replicas[0].hostname, '--state=hidden' + ]) + self._check_server_role(self.replicas[0], 'hidden') + + # check CRL status + result = self.replicas[0].run_command([ + 'ipa-crlgen-manage', 'status']) + assert "CRL generation: disabled" in result.stdout_text + + # Enbable CRL status on hidden replica + self.replicas[0].run_command([ + 'ipa-crlgen-manage', 'enable']) + + # check CRL status + result = self.replicas[0].run_command([ + 'ipa-crlgen-manage', 'status']) + assert "CRL generation: enabled" in result.stdout_text