Merge pull request #9741 from shanemcd/fix-project-inventories

Fix inventories-from-projects when running in Kubernetes

Related: #9704
Will also require a new release of the operator which will contain ansible/awx-operator#155

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
Reviewed-by: Chris Meyers <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
This commit is contained in:
softwarefactory-project-zuul[bot]
2021-03-30 14:48:48 +00:00
committed by GitHub
13 changed files with 61 additions and 79 deletions

View File

@@ -16,7 +16,7 @@ from requests.models import Response, PreparedRequest
import pytest
from awx.main.tests.functional.conftest import _request
from awx.main.models import Organization, Project, Inventory, JobTemplate, Credential, CredentialType
from awx.main.models import Organization, Project, Inventory, JobTemplate, Credential, CredentialType, ExecutionEnvironment
from django.db import transaction
@@ -261,3 +261,8 @@ def silence_warning():
"""Warnings use global variable, same as deprecations."""
with mock.patch('ansible.module_utils.basic.AnsibleModule.warn') as this_mock:
yield this_mock
@pytest.fixture
def execution_environment():
return ExecutionEnvironment.objects.create(name="test-ee", description="test-ee", managed_by_tower=True)

View File

@@ -157,7 +157,7 @@ def determine_state(module_id, endpoint, module, parameter, api_option, module_o
return 'OK'
def test_completeness(collection_import, request, admin_user, job_template):
def test_completeness(collection_import, request, admin_user, job_template, execution_environment):
option_comparison = {}
# Load a list of existing module files from disk
base_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))