From df8d2740d7ad0368c5e680fa836c04c696e48f20 Mon Sep 17 00:00:00 2001 From: jainnikhil30 Date: Thu, 15 May 2025 16:16:55 +0530 Subject: [PATCH] set the memory value to 64 in test so that the overcall capacity is not a float value --- awx/main/tests/functional/test_jobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/main/tests/functional/test_jobs.py b/awx/main/tests/functional/test_jobs.py index fd6046b1a0..430559d006 100644 --- a/awx/main/tests/functional/test_jobs.py +++ b/awx/main/tests/functional/test_jobs.py @@ -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):