mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
UI tests for "ID Range": check primary RID base duplication
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:
parent
369fb23ed9
commit
b180991aca
@ -177,6 +177,32 @@ class test_range(range_tasks):
|
||||
finally:
|
||||
self.delete_record(pkey)
|
||||
|
||||
@screenshot
|
||||
def test_add_range_with_existing_base_rid(self):
|
||||
"""
|
||||
Test creating ID Range with existing primary RID base
|
||||
"""
|
||||
self.navigate_to_entity(ENTITY)
|
||||
|
||||
pkey = 'itest-range-original'
|
||||
form_data = self.get_add_form_data(pkey)
|
||||
data = self.get_data(pkey, form_data=form_data)
|
||||
# Get RID base from previous form
|
||||
duplicated_data = self.get_data(base_rid=form_data.base_rid)
|
||||
|
||||
self.add_record(ENTITY, data, navigate=False)
|
||||
self.add_record(ENTITY, duplicated_data, navigate=False, negative=True,
|
||||
pre_delete=False)
|
||||
|
||||
dialog = self.get_last_error_dialog()
|
||||
|
||||
try:
|
||||
assert ('Constraint violation: '
|
||||
'New primary rid range overlaps with existing primary rid range.'
|
||||
in dialog.text)
|
||||
finally:
|
||||
self.delete_record(pkey)
|
||||
|
||||
@screenshot
|
||||
def test_add_range_without_rid(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user