Merge branch 'devel' into collection-existential-state-for-credential-module

This commit is contained in:
Matthew Fernandez
2023-04-10 15:31:11 -06:00
committed by GitHub
231 changed files with 18249 additions and 8709 deletions

View File

@@ -20,7 +20,9 @@ read_only_endpoints_with_modules = ['settings', 'role', 'project_update', 'workf
# If a module should not be created for an endpoint and the endpoint is not read-only add it here
# THINK HARD ABOUT DOING THIS
no_module_for_endpoint = []
no_module_for_endpoint = [
'constructed_inventory', # This is a view for inventory with kind=constructed
]
# Some modules work on the related fields of an endpoint. These modules will not have an auto-associated endpoint
no_endpoint_for_module = [

View File

@@ -26,6 +26,24 @@ def test_create_project(run_module, admin_user, organization, silence_warning):
assert result == {'name': 'foo', 'id': proj.id}
@pytest.mark.django_db
def test_create_manual_project(run_module, admin_user, organization, mocker):
mocker.patch('awx.main.models.projects.Project.get_local_path_choices', return_value=['foo_folder/'])
result = run_module(
'project',
dict(name='foo', organization=organization.name, scm_type='manual', local_path='foo_folder/', wait=False),
admin_user,
)
assert result.pop('changed', None), result
proj = Project.objects.get(name='foo')
assert proj.local_path == 'foo_folder/'
assert proj.organization == organization
result.pop('invocation')
assert result == {'name': 'foo', 'id': proj.id}
@pytest.mark.django_db
def test_create_project_copy_from(run_module, admin_user, organization, silence_warning):
'''Test the copy_from functionality'''