mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
set the memory value to 64 in test so that the overcall capacity is not a float value
This commit is contained in:
parent
c8efa82aca
commit
df8d2740d7
@ -39,13 +39,13 @@ def test_orphan_unified_job_creation(instance, inventory):
|
||||
@pytest.mark.django_db
|
||||
@mock.patch('awx.main.tasks.system.inspect_execution_and_hop_nodes', lambda *args, **kwargs: None)
|
||||
@mock.patch('awx.main.models.ha.get_cpu_effective_capacity', lambda cpu, is_control_node: 8)
|
||||
@mock.patch('awx.main.models.ha.get_mem_effective_capacity', lambda mem, is_control_node: 62)
|
||||
@mock.patch('awx.main.models.ha.get_mem_effective_capacity', lambda mem, is_control_node: 64)
|
||||
def test_job_capacity_and_with_inactive_node():
|
||||
i = Instance.objects.create(hostname='test-1')
|
||||
i.save_health_data('18.0.1', 2, 8000)
|
||||
assert i.enabled is True
|
||||
assert i.capacity_adjustment == 0.75
|
||||
assert i.capacity == 48.5
|
||||
assert i.capacity == 50
|
||||
i.enabled = False
|
||||
i.save()
|
||||
with override_settings(CLUSTER_HOST_ID=i.hostname):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user