|
|
|
@ -1506,7 +1506,7 @@ class TestDirectoryProcessor:
|
|
|
|
|
'/etc/dir_61/._cfg0000_file_0'),
|
|
|
|
|
'r') as new_file:
|
|
|
|
|
new_text = new_file.read()
|
|
|
|
|
assert new_text == '\nnew content\n'
|
|
|
|
|
assert new_text == 'new content\n'
|
|
|
|
|
|
|
|
|
|
def test_current_template_variable(self):
|
|
|
|
|
datavars.main['cl_template_path'] = os.path.join(CHROOT_PATH,
|
|
|
|
@ -1518,7 +1518,7 @@ class TestDirectoryProcessor:
|
|
|
|
|
'# Processed template files:\n' +
|
|
|
|
|
f'# {template_path}\n' +
|
|
|
|
|
'#' + '-' * 79 +
|
|
|
|
|
f'\n\ntemplate = {template_path}\n')
|
|
|
|
|
f'\ntemplate = {template_path}\n')
|
|
|
|
|
directory_processor = DirectoryProcessor(
|
|
|
|
|
'install',
|
|
|
|
|
datavars_module=datavars,
|
|
|
|
@ -1803,7 +1803,7 @@ class TestDirectoryProcessor:
|
|
|
|
|
with open(join_paths(CHROOT_PATH,
|
|
|
|
|
'/etc/file_23'), 'r') as target_file:
|
|
|
|
|
target_text = target_file.read()
|
|
|
|
|
assert target_text == "joy division -- new dawn fades"
|
|
|
|
|
assert target_text == "joy division -- new dawn fades\n"
|
|
|
|
|
|
|
|
|
|
mode = os.stat(join_paths(CHROOT_PATH, '/etc/file_23')).st_mode
|
|
|
|
|
assert int(mode) == 0o100645
|
|
|
|
|