mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 12:59:09 -07:00
Revert to using local file/dir tests in inventory instead of loader's
Fixes #12719
This commit is contained in:
parent
c637d60a8d
commit
e6d3c6745f
2 changed files with 22 additions and 7 deletions
|
@ -177,7 +177,8 @@ class TestVariableManager(unittest.TestCase):
|
|||
v = VariableManager()
|
||||
self.assertEqual(v.get_vars(loader=fake_loader, task=mock_task, use_cache=False).get("foo"), "bar")
|
||||
|
||||
def test_variable_manager_precedence(self):
|
||||
@patch.object(Inventory, 'basedir')
|
||||
def test_variable_manager_precedence(self, mock_basedir):
|
||||
'''
|
||||
Tests complex variations and combinations of get_vars() with different
|
||||
objects to modify the context under which variables are merged.
|
||||
|
@ -224,6 +225,7 @@ class TestVariableManager(unittest.TestCase):
|
|||
""",
|
||||
})
|
||||
|
||||
mock_basedir.return_value = './'
|
||||
inv1 = Inventory(loader=fake_loader, variable_manager=v, host_list='/etc/ansible/inventory1')
|
||||
inv1.set_playbook_basedir('./')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue