#8170 Nightly test failure in fedora-rawhide/test_backup_and_restore_TestBackupReinstallRestoreWithDNS
Closed: fixed 6 months ago by rcritten. Opened 6 months ago 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

6 months ago

Metadata Update from @frenaud:
- Issue assigned to frenaud

6 months ago

master:

  • ae140ae ipatests: fix backup and restore

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

6 months ago

ipa-4-8:

  • 1b7cf51 ipatests: fix backup and restore

ipa-4-7:

  • aa0bcb1 ipatests: fix backup and restore

ipa-4-6:

  • 4bd5da1 ipatests: fix backup and restore

Login to comment on this ticket.

Metadata