summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2015-11-20 15:55:06 +0100
committerMartin Basti <mbasti@redhat.com>2015-11-23 12:45:03 +0100
commit8909506a880719478dc1c346ee325566620a9d18 (patch)
tree8747ed68efb2b3e278433bd04c8e737ccba7c1cc /ipatests/test_xmlrpc
parentbf654aee1ca339b7807e80bd6a8dd42b008553c9 (diff)
downloadfreeipa-8909506a880719478dc1c346ee325566620a9d18.tar.gz
freeipa-8909506a880719478dc1c346ee325566620a9d18.tar.xz
freeipa-8909506a880719478dc1c346ee325566620a9d18.zip
update idrange tests to reflect disabled modification of local ID ranges
Fix for https://fedorahosted.org/freeipa/ticket/4826 temporarily disallowed modification of local ID ranges via API calls The corresponding XMLRPC tests were updated to reflect this change. Reviewed-By: Milan Kubik <mkubik@redhat.com>
Diffstat (limited to 'ipatests/test_xmlrpc')
-rw-r--r--ipatests/test_xmlrpc/test_range_plugin.py34
1 files changed, 10 insertions, 24 deletions
diff --git a/ipatests/test_xmlrpc/test_range_plugin.py b/ipatests/test_xmlrpc/test_range_plugin.py
index 30e67ca7c..3a41bb079 100644
--- a/ipatests/test_xmlrpc/test_range_plugin.py
+++ b/ipatests/test_xmlrpc/test_range_plugin.py
@@ -388,6 +388,11 @@ user1_uid = id_shift + 900000
group1 = u'group1'
group1_gid = id_shift + 900100
+IPA_LOCAL_RANGE_MOD_ERR = (
+ u"This command can not be used to change ID allocation for local IPA "
+ "domain. Run `ipa help idrange` for more information"
+)
+
@pytest.mark.tier1
class test_range(Declarative):
@@ -544,46 +549,28 @@ class test_range(Declarative):
command=(
'idrange_mod', [testrange1], dict(ipabaseid=user1_uid + 1)
),
- expected=errors.ValidationError(name='ipabaseid,ipaidrangesize',
- error=u'range modification leaving objects with ID out of the'
- u' defined range is not allowed'),
+ expected=errors.ExecutionError(message=IPA_LOCAL_RANGE_MOD_ERR),
),
dict(
desc='Try to modify ID range %r to get out bounds object #2' % (testrange1),
command=('idrange_mod', [testrange1], dict(ipaidrangesize=100)),
- expected=errors.ValidationError(name='ipabaseid,ipaidrangesize',
- error=u'range modification leaving objects with ID out of the'
- u' defined range is not allowed'),
+ expected=errors.ExecutionError(message=IPA_LOCAL_RANGE_MOD_ERR),
),
dict(
desc='Try to modify ID range %r to get out bounds object #3' % (testrange1),
command=('idrange_mod', [testrange1], dict(ipabaseid=100, ipaidrangesize=100)),
- expected=errors.ValidationError(name='ipabaseid,ipaidrangesize',
- error=u'range modification leaving objects with ID out of the'
- u' defined range is not allowed'),
+ expected=errors.ExecutionError(message=IPA_LOCAL_RANGE_MOD_ERR),
),
dict(
desc='Modify ID range %r' % (testrange1),
command=('idrange_mod', [testrange1], dict(ipaidrangesize=90000)),
- expected=dict(
- result=dict(
- cn=[testrange1],
- ipabaseid=[unicode(testrange1_base_id)],
- ipabaserid=[unicode(testrange1_base_rid)],
- ipasecondarybaserid=[unicode(testrange1_secondary_base_rid)],
- ipaidrangesize=[u'90000'],
- iparangetyperaw=[u'ipa-local'],
- iparangetype=[u'local domain range'],
- ),
- value=testrange1,
- summary=u'Modified ID range "%s"' % (testrange1),
- ),
+ expected=errors.ExecutionError(message=IPA_LOCAL_RANGE_MOD_ERR)
),
@@ -659,8 +646,7 @@ class test_range(Declarative):
desc='Try to modify ID range %r so that its rid ranges are overlapping themselves' % (testrange2),
command=('idrange_mod', [testrange2],
dict(ipabaserid=(testrange2_secondary_base_rid))),
- expected=errors.ValidationError(
- name='ID Range setup', error='Primary RID range and secondary RID range cannot overlap'),
+ expected=errors.ExecutionError(message=IPA_LOCAL_RANGE_MOD_ERR),
),
dict(