mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 02:17:37 -02:30
Clean up work_type processing and fix execution vs control capacity (#10930)
* Clean up added work_type processing for mesh_code branch * track both execution and control capacity * Remove unused execution_capacity property * Count all forms of capacity to make test pass * Force jobs to be on execution nodes, updates on control nodes * Introduce capacity_type property to abstract some details out * Update test to cover all job types at same time * Register OpenShift nodes as control types * Remove unqualified consumed_capacity from task manager and make unit tests work * Remove unqualified consumed_capacity from task manager and make unit tests work * Update unit test to execution vs control TM logic changes * Fix bug, else handling for work_type method
This commit is contained in:
@@ -121,7 +121,7 @@ def run_computed_fields_right_away(request):
|
||||
|
||||
@pytest.fixture
|
||||
@mock.patch.object(Project, "update", lambda self, **kwargs: None)
|
||||
def project(instance, organization):
|
||||
def project(organization):
|
||||
prj = Project.objects.create(
|
||||
name="test-proj",
|
||||
description="test-proj-desc",
|
||||
@@ -136,7 +136,7 @@ def project(instance, organization):
|
||||
|
||||
@pytest.fixture
|
||||
@mock.patch.object(Project, "update", lambda self, **kwargs: None)
|
||||
def manual_project(instance, organization):
|
||||
def manual_project(organization):
|
||||
prj = Project.objects.create(
|
||||
name="test-manual-proj",
|
||||
description="manual-proj-desc",
|
||||
@@ -196,7 +196,7 @@ def instance(settings):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def organization(instance):
|
||||
def organization():
|
||||
return Organization.objects.create(name="test-org", description="test-org-desc")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user