URL: https://github.com/freeipa/freeipa/pull/4128 Author: rcritten Title: #4128: [Backport][ipa-4-6] ipa tests: fix backup and restore Action: opened
PR body: """ This PR was opened automatically because PR #4127 was pushed to master and backport to ipa-4-6 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/4128/head:pr4128 git checkout pr4128
From c74e6b6d68f65ac710e283e6653c7f77969e08a7 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <f...@redhat.com> Date: Tue, 14 Jan 2020 13:52:49 +0100 Subject: [PATCH] ipatests: fix backup and restore The tests for backup_and_restore check that the ipa-backup command compresses the tar file AFTER restarting IPA services by reading the output and looking for a pattern with "gzip" before "Starting IPA service." As the tar file name is randomly created, it sometimes happen that the name contains gzip and in this case the test wrongly assumes that the gzip cmd was called. The fix makes a stricter comparison, looking for /bin/gzip. Fixes: https://pagure.io/freeipa/issue/8170 --- ipatests/test_integration/test_backup_and_restore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py index f302e6563a..5a932c60a4 100644 --- a/ipatests/test_integration/test_backup_and_restore.py +++ b/ipatests/test_integration/test_backup_and_restore.py @@ -144,7 +144,7 @@ def backup(host): # Test for ticket 7632: check that services are restarted # before the backup is compressed - pattern = r'.*gzip.*Starting IPA service.*' + pattern = r'.*{}.*Starting IPA service.*'.format(paths.GZIP) if (re.match(pattern, result.stderr_text, re.DOTALL)): raise AssertionError('IPA Services are started after compression')
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org