From c9be8b9aba6f06325c56cff7b98046660cb2db94 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 15 Dec 2025 13:10:50 +0000 Subject: [PATCH] tests: Fix bound Ensure we do not negative values except for -1 (unlimited). Change-Id: I9a0184ed54054c6466833df24dfbe9ca7d1b454b Signed-off-by: Stephen Finucane --- nova/tests/unit/api/openstack/compute/test_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/unit/api/openstack/compute/test_limits.py b/nova/tests/unit/api/openstack/compute/test_limits.py index 2526c955bf5b..8815b1ea6220 100644 --- a/nova/tests/unit/api/openstack/compute/test_limits.py +++ b/nova/tests/unit/api/openstack/compute/test_limits.py @@ -57,7 +57,7 @@ def fake_get_project_quotas(context, project_id, usages=True): } return { - k: {'limit': v, 'in_use': v // 2} + k: {'limit': v, 'in_use': max(-1, v // 2)} for k, v in absolute_limits.items() }