mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
test_backup_and_restore.py Fix logging
Use strings to log in restore_checker and backup functions. Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
80585f5c56
commit
86a6fdcc43
@@ -129,13 +129,13 @@ def restore_checker(host):
|
||||
|
||||
results = []
|
||||
for check, assert_func in CHECKS:
|
||||
logger.info('Storing result for %s', check)
|
||||
logger.info('Storing result for %s', check.__name__)
|
||||
results.append(check(host))
|
||||
|
||||
yield
|
||||
|
||||
for (check, assert_func), expected in zip(CHECKS, results):
|
||||
logger.info('Checking result for %s', check)
|
||||
logger.info('Checking result for %s', check.__name__)
|
||||
got = check(host)
|
||||
assert_func(expected, got)
|
||||
|
||||
@@ -149,7 +149,7 @@ def backup(host):
|
||||
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)
|
||||
logger.info('Backup path for %s is %s', host.hostname, backup_path)
|
||||
return backup_path
|
||||
else:
|
||||
raise AssertionError('Backup directory not found in output')
|
||||
|
||||
Reference in New Issue
Block a user