|
|
|
@ -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
|
|
|
|
|