test_backup_and_restore.py AssertionError fix

prefix in the backup function expects output to have
'ipa.ipaserver.install.ipa_backup.Backup:' and it's wrong. The right
one is 'ipaserver.install.ipa_backup:'.

https://pagure.io/freeipa/issue/7339

Reviewed-By: Felipe Volpone <fbarreto@redhat.com>
This commit is contained in:
Aleksei Slaikovskii 2017-12-04 11:56:50 +01:00 committed by Christian Heimes
parent 830866d68a
commit a70dcb1e18

View File

@ -126,8 +126,7 @@ def backup(host):
# Get the backup location from the command's output
for line in result.stderr_text.splitlines():
prefix = ('ipa.ipaserver.install.ipa_backup.Backup: '
'INFO: Backed up to ')
prefix = 'ipaserver.install.ipa_backup: INFO: Backed up to '
if line.startswith(prefix):
backup_path = line[len(prefix):].strip()
logger.info('Backup path for %s is %s', host, backup_path)
@ -136,7 +135,6 @@ def backup(host):
raise AssertionError('Backup directory not found in output')
class TestBackupAndRestore(IntegrationTest):
topology = 'star'
@ -409,6 +407,7 @@ class TestBackupAndRestoreWithKRA(BaseBackupAndRestoreWithKRA):
"""backup, uninstall, restore"""
self._full_backup_restore_with_vault(reinstall=False)
class TestBackupReinstallRestoreWithKRA(BaseBackupAndRestoreWithKRA):
def test_full_backup_reinstall_restore_with_vault(self):
"""backup, uninstall, reinstall, restore"""