From 931e832944393b0d59762de4a240ec63a7632f5b Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 21 Aug 2024 18:57:02 +0200 Subject: [PATCH] test/dracut: update subprocess.run() call count --- stages/test/test_dracut.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stages/test/test_dracut.py b/stages/test/test_dracut.py index 7e019f8b..6aed287a 100644 --- a/stages/test/test_dracut.py +++ b/stages/test/test_dracut.py @@ -22,7 +22,10 @@ def test_dracut_with_initoverlayfs(mocked_run, tmp_path, stage_module, with_init stage_module.main(str(tmp_path), options) - assert len(mocked_run.call_args_list) == 1 + # subprocess.run() gets called 4 times: + # - once for the 'dracut' or 'initoverlayfs-install' call + # - three times for the 'umount' calls to unmount /proc, /dev, and /sys + assert len(mocked_run.call_args_list) == 4 args, kwargs = mocked_run.call_args_list[0] assert kwargs.get("check") is True run_argv = args[0]