#7970 test failure in test_backup_and_restore.py::TestBackupAndRestore
Closed: fixed by fcami. Opened by frenaud.

Issue

The test test_backup_and_restore.py::TestBackupAndRestore::()::test_full_backup_and_restore_with_selinux_booleans_off is failing since we are using the new VM template ci-master-f29 v 0.2.1 which has SELinux disabled.

See test report.

Steps to Reproduce

  1. run IPATEST_YAML_CONFIG=/path/to/your/config.yaml ipa-run-tests --logging-level=DEBUG --logfile-dir=/tmp/tests test_integration/test_backup_and_restore.py::TestBackupAndRestore
    on a machine with SELinux disabled.

Actual behavior

The test fails in

 result = self.master.run_command([
'getsebool',
'httpd_can_network_connect',
> 'httpd_manage_ipa',
])

with the following output:

E           subprocess.CalledProcessError: Command '['getsebool', 'httpd_can_network_connect', 'httpd_manage_ipa']' returned non-zero exit status 1.

Expected behavior

Test should either succeed or be skipped.

Version/Release/Distribution

master branch on 05-Jun-2019

Additional info:

As the test is calling getsebool on a system with SELinux disabled, the command fails. The test should rather be skipped on such an environment.


Metadata Update from @frenaud:
- Issue assigned to frenaud

Metadata Update from @frenaud:
- Issue set to the milestone: FreeIPA 4.7.3
- Issue tagged with: test-failure, tests

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/3241

Metadata Update from @frenaud:
- Issue set to the milestone: FreeIPA 4.8 (was: FreeIPA 4.7.3)

Also failing in ipa-4-7 branch, hence setting the milestone to 4.7.3.

Metadata Update from @frenaud:
- Issue set to the milestone: FreeIPA 4.7.3 (was: FreeIPA 4.8)

Changing milestone to 4.6.6 because lalso affects that branch.

Metadata Update from @rcritten:
- Issue set to the milestone: FreeIPA 4.6.6 (was: FreeIPA 4.7.3)

master:

  • 6ec3c84c0ca3f43d09272ffa6d656c1ed72067cb ipatests: fix test_backup_and_restore.py::TestBackupAndRestore

ipa-4-6:

  • 9816b18d23b3174ef9a77126062e30539022105c Refactor tasks to include is_selinux_enabled()
  • f27b2746c099193b87dd719a5b03f086aaa4740a ipatests: fix test_backup_and_restore.py::TestBackupAndRestore

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

ipa-4-7:

  • 5a47f759dfaae183468c1e21e9bb622c2a885b85 ipatests: fix test_backup_and_restore.py::TestBackupAndRestore
Metadata