diff --git a/tests/templates/test_directory_processor.py b/tests/templates/test_directory_processor.py index b0f7c0e..2b17c56 100644 --- a/tests/templates/test_directory_processor.py +++ b/tests/templates/test_directory_processor.py @@ -801,16 +801,20 @@ class TestDirectoryProcessor: def test_if_templates_contain_a_template_file_with_a_target_path_to_a_file_with_some_cfg_files_and_changes_in_the_template_is_the_same_as_in_the_last_cfg_file__the_directory_processor_does_nothing(self): datavars.main['cl_template_path'] = os.path.join(CHROOT_PATH, 'templates_28') + cfg_path_1 = os.path.join(CHROOT_PATH, 'etc/._cfg0001_file_12') cfg_path_2 = os.path.join(CHROOT_PATH, 'etc/._cfg0002_file_12') - cfg_path_3 = os.path.join(CHROOT_PATH, 'etc/._cfg0003_file_12') + + directory_processor = DirectoryProcessor('install', + datavars_module=datavars) + directory_processor.process_template_directories() directory_processor = DirectoryProcessor('install', datavars_module=datavars) directory_processor.process_template_directories() assert os.path.exists(join_paths(CHROOT_PATH, 'etc/file_12')) - assert os.path.exists(cfg_path_2) - assert not os.path.exists(cfg_path_3) + assert os.path.exists(cfg_path_1) + assert not os.path.exists(cfg_path_2) assert '/etc/file_12'\ in directory_processor.template_executor.calculate_config_file diff --git a/tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0001_file_12 b/tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0001_file_12.backup similarity index 100% rename from tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0001_file_12 rename to tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0001_file_12.backup diff --git a/tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0002_file_12 b/tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0002_file_12.backup similarity index 100% rename from tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0002_file_12 rename to tests/templates/testfiles/test_dir_processor_root/etc.backup/._cfg0002_file_12.backup diff --git a/tests/templates/testfiles/test_dir_processor_root/var.backup/lib/calculate/config b/tests/templates/testfiles/test_dir_processor_root/var.backup/lib/calculate/config index 37c7054..e69de29 100644 --- a/tests/templates/testfiles/test_dir_processor_root/var.backup/lib/calculate/config +++ b/tests/templates/testfiles/test_dir_processor_root/var.backup/lib/calculate/config @@ -1 +0,0 @@ -/etc/file_12 da971af62bcd1bf533851f69a2780bf7