mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
SCM inventory acceptance and bug updates
* fixed a problem where the SCM last revision was not getting reset * change the 400 editing error to just reset the last revision * handle `source_vars` in the same way as custom scripts * block unallowed `source_vars` in the validator * hide POST in OPTIONS for inventory source sublist if not allowed
This commit is contained in:
@@ -241,13 +241,17 @@ def inventory(organization):
|
||||
|
||||
@pytest.fixture
|
||||
def scm_inventory_source(inventory, project):
|
||||
return InventorySource.objects.create(
|
||||
inv_src = InventorySource(
|
||||
name="test-scm-inv",
|
||||
source_project=project,
|
||||
source='scm',
|
||||
source_path='inventory_file',
|
||||
update_on_project_update=True,
|
||||
inventory=inventory)
|
||||
inventory=inventory,
|
||||
scm_last_revision=project.scm_revision)
|
||||
with mock.patch.object(inv_src.source_project, 'update'):
|
||||
inv_src.save()
|
||||
return inv_src
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user