diff options
author | Matt Martz <matt@sivel.net> | 2019-01-03 15:13:02 -0600 |
---|---|---|
committer | ansibot <ansibot@users.noreply.github.com> | 2019-01-03 16:13:02 -0500 |
commit | 3b49bbcfde9de44a7f3c71219c1d7a2d97f2dd65 (patch) | |
tree | ebf9d5494952c8d9ebe49099b289615d12368fe5 /test/units | |
parent | 6620facd195a3f030d592f2d28ca8daae04de6b9 (diff) | |
download | ansible-3b49bbcfde9de44a7f3c71219c1d7a2d97f2dd65.tar.gz |
Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969
* Update units
Diffstat (limited to 'test/units')
-rw-r--r-- | test/units/playbook/test_included_file.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/units/playbook/test_included_file.py b/test/units/playbook/test_included_file.py index e4f1b3bd18..dc919cbef1 100644 --- a/test/units/playbook/test_included_file.py +++ b/test/units/playbook/test_included_file.py @@ -65,6 +65,7 @@ def test_process_include_results(mock_iterator, mock_variable_manager): parent_task_ds = {'debug': 'msg=foo'} parent_task = Task.load(parent_task_ds) + parent_task._play = None task_ds = {'include': 'include_test.yml'} loaded_task = TaskInclude.load(task_ds, task_include=parent_task) @@ -91,12 +92,15 @@ def test_process_include_diff_files(mock_iterator, mock_variable_manager): parent_task_ds = {'debug': 'msg=foo'} parent_task = Task.load(parent_task_ds) + parent_task._play = None task_ds = {'include': 'include_test.yml'} loaded_task = TaskInclude.load(task_ds, task_include=parent_task) + loaded_task._play = None child_task_ds = {'include': 'other_include_test.yml'} loaded_child_task = TaskInclude.load(child_task_ds, task_include=loaded_task) + loaded_child_task._play = None return_data = {'include': 'include_test.yml'} # The task in the TaskResult has to be a TaskInclude so it has a .static attr @@ -129,6 +133,9 @@ def test_process_include_simulate_free(mock_iterator, mock_variable_manager): parent_task1 = Task.load(parent_task_ds) parent_task2 = Task.load(parent_task_ds) + parent_task1._play = None + parent_task2._play = None + task_ds = {'include': 'include_test.yml'} loaded_task1 = TaskInclude.load(task_ds, task_include=parent_task1) loaded_task2 = TaskInclude.load(task_ds, task_include=parent_task2) |