Added ignoring files from the base templates directory. fixed #32

master
Иванов Денис 3 years ago
parent 3f1ce7f876
commit 68cc128d96

@ -2135,6 +2135,8 @@ class DirectoryProcessor:
entries = os.scandir(self.base_directory)
for node in entries:
if node.is_file():
continue
self.directory_tree = {}
parameters = ParametersContainer()
if self._namespace:

@ -1459,6 +1459,17 @@ class TestDirectoryProcessor:
output_text = output_file.read()
assert output_text == expected_output
def test_ignoring_files_in_templates_base_directory(self):
datavars.main['cl_template_path'] = os.path.join(CHROOT_PATH,
'templates_46')
directory_processor = DirectoryProcessor(
'install',
datavars_module=datavars,
package='test-category/test-package'
)
directory_processor.process_template_directories()
assert os.path.exists(join_paths(CHROOT_PATH,'/etc/dir_63/file_0'))
def test_view_tree(self):
list_path = join_paths(CHROOT_PATH, '/etc')
show_tree(list_path)

@ -0,0 +1 @@
{% calculate action = "install", append = "skip", package = "test-category/test-package" %}

@ -0,0 +1,2 @@
{% calculate append = 'join', format = 'raw' %}
Something I can never have
Loading…
Cancel
Save