URL: https://github.com/freeipa/freeipa/pull/1567
Author: slaykovsky
 Title: #1567: test_backup_and_restore.py Fix logging
Action: opened

PR body:
Use strings to log in restore_checker and backup functions.

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1567/head:pr1567
git checkout pr1567
From f353e36ea350ab19388c87466bf11db8bb0cb4a2 Mon Sep 17 00:00:00 2001
From: Aleksei Slaikovskii <aslai...@redhat.com>
Date: Tue, 13 Feb 2018 14:21:53 +0100
Subject: [PATCH] test_backup_and_restore.py Fix logging

Use strings to log in restore_checker and backup functions.
 ipatests/test_integration/test_backup_and_restore.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py
index 7a2cee37f5..c03148833d 100644
--- a/ipatests/test_integration/test_backup_and_restore.py
+++ b/ipatests/test_integration/test_backup_and_restore.py
@@ -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__)
     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
         raise AssertionError('Backup directory not found in output')
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to