#8170 Nightly test failure in fedora-rawhide/test_backup_and_restore_TestBackupReinstallRestoreWithDNS
Closed: fixed by rcritten. Opened by frenaud.

Nightly test failure in fedora-rawhide/test_backup_and_restore_TestBackupReinstallRestoreWithDNS in the method TestBackupReinstallRestoreWithDNS::test_full_backup_reinstall_restore_with_DNS_zone.

Noticed in PR #118 with the following logs.

Logs:

self = <ipatests.test_integration.test_backup_and_restore.TestBackupReinstallRestoreWithDNS object at 0x7f532e1a2820>
    def test_full_backup_reinstall_restore_with_DNS_zone(self):
        """backup, uninstall, reinstall, restore"""
>       self._full_backup_restore_with_DNS_zone(reinstall=True)
test_integration/test_backup_and_restore.py:342: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_integration/test_backup_and_restore.py:309: in _full_backup_restore_with_DNS_zone
    backup_path = backup(self.master)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
host = <ipatests.pytest_ipa.integration.host.Host master.ipa.test (master)>
    def backup(host):
        """Run backup on host, return the path to the backup directory"""
        result = host.run_command(['ipa-backup', '-v'])
        # Test for ticket 7632: check that services are restarted
        # before the backup is compressed
        pattern = r'.*gzip.*Starting IPA service.*'
        if (re.match(pattern, result.stderr_text, re.DOTALL)):
>           raise AssertionError('IPA Services are started after compression')
E           AssertionError: IPA Services are started after compression

The test is calling ipa-backup and checks that the command is re-starting IPA services before calling gzip. The backup name is randomly created and sometimes contains the 'gzip' string, resulting in a failure detected while it should not.

To fix the problem, the code can performed a stricter strict comparison.


Metadata Update from @frenaud:
- Issue tagged with: test-failure, tests

Metadata Update from @frenaud:
- Issue assigned to frenaud

master:

  • ae140ae40692154ce692c03901f6e17c0e227498 ipatests: fix backup and restore

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

ipa-4-8:

  • 1b7cf51e292b917a18ec7959708cb62ceddd44b7 ipatests: fix backup and restore

ipa-4-7:

  • aa0bcb1380198fee4028eeb327c6541828779391 ipatests: fix backup and restore

ipa-4-6:

  • 4bd5da1417f12e9f1f22d20b09ed58dcbcfca5cc ipatests: fix backup and restore
Metadata