Skip to content

Commit

Permalink
test: restore fstab/crypttab for RHEL 8 storage tests
Browse files Browse the repository at this point in the history
When re-trying non-destructive tests the testFstabOptions test fails as
/etc/fstab is not restored to its pristine state. CoreOS does not run
storage tests so should not restore fstab/crypttab and the ws-container
scenario should not stop cockpit as it isn't installed on the host
itself.
  • Loading branch information
jelly committed Oct 31, 2024
1 parent 40cb4cb commit b66d6c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/common/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,13 +1816,14 @@ def cleanup_home_dirs() -> None:
# cockpit configuration
self.restore_dir("/etc/cockpit")

if not m.ws_container:
if not m.ostree_image:
# for storage tests
self.restore_file("/etc/fstab")
self.restore_file("/etc/crypttab")

# tests expect cockpit.service to not run at start; also, avoid log leakage into the next test
self.addCleanup(m.execute, "systemctl stop --quiet cockpit")
if not m.ws_container:
# tests expect cockpit.service to not run at start; also, avoid log leakage into the next test
self.addCleanup(m.execute, "systemctl stop --quiet cockpit")

# The sssd daemon seems to get confused when we restore
# backups of /etc/group etc and stops following updates to it.
Expand Down

0 comments on commit b66d6c8

Please sign in to comment.