Skip to content

Commit

Permalink
Merge pull request #5284 from vojtechtrefny/master_mount-test-adjustment
Browse files Browse the repository at this point in the history
Adjust test_mount_filesystems to the latest blivet changes
  • Loading branch information
vojtechtrefny authored Nov 8, 2023
2 parents 7d6d52a + 5cffb0c commit 0eec752
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1548,29 +1548,26 @@ def test_activate_filesystems(self, patched_conf):

@patch("os.chmod")
@patch("os.makedirs")
@patch("blivet.util._run_program")
@patch("blivet.tasks.fsmount.FSMount.do_task")
@patch("pyanaconda.core.util._run_program")
def test_mount_filesystems(self, core_run_program, blivet_run_program, makedirs, chmod):
def test_mount_filesystems(self, core_run_program, blivet_mount, makedirs, chmod):
"""Test MountFilesystemsTask."""
storage = create_storage()
storage._bootloader = Mock()
blivet_run_program.return_value = (0, "")
blivet_mount.return_value = None
core_run_program.return_value = (0, "")

task = MountFilesystemsTask(storage)
task.run()

# created mount points
makedirs.assert_any_call('/mnt/sysimage/dev', 0o755)
makedirs.assert_any_call('/mnt/sysimage/tmp')

# fixed permissions
chmod.assert_any_call('/mnt/sysimage/tmp', 0o1777)

# mounted devices
blivet_run_program.assert_any_call([
'mount', '-t', 'bind', '-o', 'bind,defaults', '/dev', '/mnt/sysimage/dev'
])
blivet_mount.assert_any_call('/mnt/sysimage/dev', options='defaults')

# remounted the root filesystem
core_run_program.assert_any_call(
Expand Down

0 comments on commit 0eec752

Please sign in to comment.