mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui tests: fix algo for finding available idrange
The webui tests for ID range evaluate a potentially free id range by looking for existing ranges and picking a range = max value + 1 million. With the addition of subuid range this algorithm produces values over the limit because the subuid range goes from 2,147,483,648 to 4,294,836,224 and the max base id is 4,294,967,295. Ignore the subuid range when picking a potential range. Fixes: https://pagure.io/freeipa/issue/8919 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
cb37f499db
commit
319aa7a4b1
@ -64,6 +64,12 @@ class range_tasks(UI_driver):
|
|||||||
max_rid = 0
|
max_rid = 0
|
||||||
|
|
||||||
for idrange in idranges:
|
for idrange in idranges:
|
||||||
|
# IPA.TEST_subid_range is automatically created near the end
|
||||||
|
# of the allowed ids, taking from 2,147,483,648 to 4,294,836,224
|
||||||
|
# Ignore this range when looking for available ids otherwise
|
||||||
|
# we won't find any value < max baseid 4,294,967,295
|
||||||
|
if idrange['cn'][0].endswith("_subid_range"):
|
||||||
|
continue
|
||||||
size = int(idrange['ipaidrangesize'][0])
|
size = int(idrange['ipaidrangesize'][0])
|
||||||
base_id = int(idrange['ipabaseid'][0])
|
base_id = int(idrange['ipabaseid'][0])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user