diff --git a/tests/templates/test_template_executor.py b/tests/templates/test_template_executor.py index d079e1c..0bfc6b3 100644 --- a/tests/templates/test_template_executor.py +++ b/tests/templates/test_template_executor.py @@ -576,6 +576,7 @@ class TestTemplateExecutor: def test_if_the_remove_directory_method_s_input_is_a_path_to_an_existing_empty_directory__the_method_will_remove_the_directory(self): target_path = join_paths(CHROOT_PATH, '/etc/remove_dir_testfiles/dir_0') + os.remove(os.path.join(target_path, 'file')) template_executor._remove_directory(target_path) assert not os.path.exists(target_path) @@ -1079,6 +1080,7 @@ class TestTemplateExecutor: target_path = join_paths( CHROOT_PATH, '/etc/append_replace_dir_testfiles/dir_2') + os.remove(os.path.join(target_path, 'file')) parameters_object = ParametersContainer({'package': test_package_name, 'append': 'replace'}) template_wrapper = TemplateWrapper( diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/append_replace_dir_testfiles/dir_2/file b/tests/templates/testfiles/test_executor_root/etc.backup/append_replace_dir_testfiles/dir_2/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/append_replace_dir_testfiles/dir_3/file b/tests/templates/testfiles/test_executor_root/etc.backup/append_replace_dir_testfiles/dir_3/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/chmod_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/chmod_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/chmod_testfiles/dir_2/file b/tests/templates/testfiles/test_executor_root/etc.backup/chmod_testfiles/dir_2/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/chown_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/chown_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/chown_testfiles/dir_2/file b/tests/templates/testfiles/test_executor_root/etc.backup/chown_testfiles/dir_2/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/clear_dir_testfiles/dir_2/subdir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/clear_dir_testfiles/dir_2/subdir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/clear_dir_testfiles/dir_2/subdir_1/file b/tests/templates/testfiles/test_executor_root/etc.backup/clear_dir_testfiles/dir_2/subdir_1/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/clear_file_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/clear_file_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_1/file b/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_1/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_2/file b/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_2/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_3/file b/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_3/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_4/file b/tests/templates/testfiles/test_executor_root/etc.backup/create_dir_testfiles/dir_4/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/exec_parameter_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/exec_parameter_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/exec_parameter_testfiles/dir_2/file b/tests/templates/testfiles/test_executor_root/etc.backup/exec_parameter_testfiles/dir_2/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/exec_parameter_testfiles/dir_3/file b/tests/templates/testfiles/test_executor_root/etc.backup/exec_parameter_testfiles/dir_3/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/link_dir_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/link_dir_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/link_dir_testfiles/dir_1/file b/tests/templates/testfiles/test_executor_root/etc.backup/link_dir_testfiles/dir_1/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/remove_dir_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/remove_dir_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/remove_dir_testfiles/dir_1/file b/tests/templates/testfiles/test_executor_root/etc.backup/remove_dir_testfiles/dir_1/file new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/run_exec_testfiles/dir_0/file_to_save_directory b/tests/templates/testfiles/test_executor_root/etc.backup/run_exec_testfiles/dir_0/file_to_save_directory new file mode 100644 index 0000000..e69de29 diff --git a/tests/templates/testfiles/test_executor_root/etc.backup/run_parameter_testfiles/dir_0/file b/tests/templates/testfiles/test_executor_root/etc.backup/run_parameter_testfiles/dir_0/file new file mode 100644 index 0000000..e69de29