diff --git a/tests/test_storage_init.py b/tests/test_storage_init.py index efe27d4c..9b7138a4 100644 --- a/tests/test_storage_init.py +++ b/tests/test_storage_init.py @@ -36,8 +36,8 @@ def setUp(self): # There are tweaks we need to make the to storage-init: # - Change the location of various key files - # - Add an alias for the shell's built-in '[' operator to a command we - # can mock + # - Replace the uses of the shell's built-in '[' operator to a command + # we can mock # - Ensure that the script calls a special command when it exits, so # that the test knows when it is done. @@ -61,7 +61,8 @@ def setUp(self): script = re.sub(r"/var/lib/misc/ran-storage-init\b", os.path.join(self.test_dir.name, "ran-storage-init"), script) - script = f"trap on_exit EXIT\nalias [=mock_test\n{script}" + script = re.sub(r"(?