mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
UI tests for "ID Range": check creating ID Range with overlapping of primary and secondary RID base
https://pagure.io/freeipa/issue/7709 Reviewed-By: Mohammad Rizwan Yusuf <myusuf@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
@@ -46,6 +46,11 @@ class range_tasks(UI_driver):
|
||||
'New secondary rid range overlaps with existing secondary rid range.'
|
||||
)
|
||||
|
||||
PRIMARY_AND_SECONDARY_RID_OVERLAP_ERROR = (
|
||||
"invalid 'ID Range setup': "
|
||||
"Primary RID range and secondary RID range cannot overlap"
|
||||
)
|
||||
|
||||
def get_shifts(self):
|
||||
result = self.execute_api_from_ui('idrange_find', [], {})
|
||||
idranges = result['result']['result']
|
||||
|
||||
@@ -214,6 +214,23 @@ class test_range(range_tasks):
|
||||
finally:
|
||||
self.delete_record(pkey)
|
||||
|
||||
@screenshot
|
||||
def test_add_range_with_overlapping_primary_and_secondary_rid(self):
|
||||
"""
|
||||
Test creating ID Range with overlapping of primary and secondary RID
|
||||
"""
|
||||
form_data = self.get_add_form_data(PKEY)
|
||||
form_data.secondary_base_rid = form_data.base_rid
|
||||
data = self.get_data(PKEY, form_data=form_data)
|
||||
|
||||
self.add_record(ENTITY, data, negative=True)
|
||||
dialog = self.get_last_error_dialog()
|
||||
|
||||
try:
|
||||
assert self.PRIMARY_AND_SECONDARY_RID_OVERLAP_ERROR in dialog.text
|
||||
finally:
|
||||
self.delete_record(PKEY)
|
||||
|
||||
@screenshot
|
||||
def test_add_range_with_existing_base_rid(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user