From 26e35dca413ecfa68df0b6115bed17ea4421fe31 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Nov 20 2018 14:12:25 +0000 Subject: ipatests: add test for ipa-replica-install options Add a test checking that --password and --admin-password options are mutually exclusive. Related to https://pagure.io/freeipa/issue/6353 Reviewed-By: Christian Heimes --- diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 7803c34..e665318 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -50,6 +50,26 @@ class TestReplicaPromotionLevel1(ReplicaPromotionBase): domain_level = DOMAIN_LEVEL_1 @replicas_cleanup + def test_one_step_install_pwd_and_admin_pwd(self): + """--password and --admin-password options are mutually exclusive + + Test for ticket 6353 + """ + expected_err = "--password and --admin-password options are " \ + "mutually exclusive" + result = self.replicas[0].run_command([ + 'ipa-replica-install', '-w', + self.master.config.admin_password, + '-p', 'OTPpwd', + '-n', self.master.domain.name, + '-r', self.master.domain.realm, + '--server', self.master.hostname, + '-U'], + raiseonerr=False) + assert result.returncode == 1 + assert expected_err in result.stderr_text + + @replicas_cleanup def test_one_command_installation(self): """ TestCase: