From 6b25cd3241a5609b4d903d5697b8947fab403c90 Mon Sep 17 00:00:00 2001 From: Kaleemullah Siddiqui Date: Wed, 17 Feb 2021 19:43:00 +0530 Subject: [PATCH] ipatests: error message check in uninstall log for KRA This test checks that there is no error message in uninstall log for KRA instance when IPA was installed with KRA. related: https://pagure.io/freeipa/issue/8550 Signed-off-by: Kaleemullah Siddiqui Reviewed-By: Florence Blanc-Renaud Reviewed-By: Rob Crittenden --- .../test_backup_and_restore.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py index f13dfb5cb..6890ef201 100644 --- a/ipatests/test_integration/test_backup_and_restore.py +++ b/ipatests/test_integration/test_backup_and_restore.py @@ -451,9 +451,11 @@ class BaseBackupAndRestoreWithKRA(IntegrationTest): backup_path = tasks.get_backup_dir(self.master) - self.master.run_command(['ipa-server-install', - '--uninstall', - '-U']) + # check that no error message in uninstall log for KRA instance + cmd = self.master.run_command(['ipa-server-install', + '--uninstall', + '-U']) + assert "failed to uninstall KRA" not in cmd.stderr_text if reinstall: tasks.install_master(self.master, setup_dns=True) @@ -482,6 +484,20 @@ class TestBackupReinstallRestoreWithKRA(BaseBackupAndRestoreWithKRA): """backup, uninstall, reinstall, restore""" self._full_backup_restore_with_vault(reinstall=True) + def test_no_error_message_with_uninstall_ipa_with_kra(self): + """Test there is no error message in uninstall log for KRA instance + + There was error message in uninstall log when IPA with KRA was + uninstalled. This test check that there is no error message in + uninstall log for kra instance. + + related: https://pagure.io/freeipa/issue/8550 + """ + cmd = self.master.run_command(['ipa-server-install', + '--uninstall', + '-U']) + assert "failed to uninstall KRA" not in cmd.stderr_text + class TestBackupAndRestoreWithReplica(IntegrationTest): """Regression tests for issues 7234 and 7455 -- 2.29.2