mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 05:47:38 -02:30
refactor inventory Loaders for ansible-inventory
* remove support for loading from executable and static files * instead use ansible-inventory with fallback to backport * provide private file dir in task manager for cred injection * durable management of tmp dirs for user scripts * new 'scm' source choice for scm-type * update SCM inventory docs to new reality
This commit is contained in:
@@ -117,7 +117,7 @@ class TestInvalidOptionsFunctional:
|
||||
@mock.patch.object(inventory_import.Command, 'set_logging_level', mock_logging)
|
||||
class TestINIImports:
|
||||
|
||||
@mock.patch.object(inventory_import.BaseLoader, 'load', mock.MagicMock(return_value=TEST_MEM_OBJECTS))
|
||||
@mock.patch.object(inventory_import.AnsibleInventoryLoader, 'load', mock.MagicMock(return_value=TEST_MEM_OBJECTS))
|
||||
def test_inventory_single_ini_import(self, inventory, capsys):
|
||||
cmd = inventory_import.Command()
|
||||
r = cmd.handle_noargs(
|
||||
|
||||
@@ -12,7 +12,8 @@ class TestSCMUpdateFeatures:
|
||||
inv_src = InventorySource(
|
||||
scm_project=project,
|
||||
source_path='inventory_file',
|
||||
inventory=inventory)
|
||||
inventory=inventory,
|
||||
source='scm')
|
||||
with mock.patch.object(inv_src.scm_project, 'update') as mck_update:
|
||||
inv_src.save()
|
||||
mck_update.assert_called_once_with()
|
||||
|
||||
Reference in New Issue
Block a user