When I fixed https://fedorahosted.org/freeipa/ticket/4826 I forgot to
fix the corresponding xmlrpc tests.
This oversight bit me today when I ran in-tree tests on my VM.
Here is the patch that makes idrange tests green and shiny again.
--
Martin^3 Babinsky
From 5709303aabcc26fd2faf8236861c98d8938d4620 Mon Sep 17 00:00:00 2001
From: Martin Babinsky <mbabi...@redhat.com>
Date: Fri, 20 Nov 2015 15:55:06 +0100
Subject: [PATCH] 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.
---
ipatests/test_xmlrpc/test_range_plugin.py | 34 +++++++++----------------------
1 file changed, 10 insertions(+), 24 deletions(-)
diff --git a/ipatests/test_xmlrpc/test_range_plugin.py b/ipatests/test_xmlrpc/test_range_plugin.py
index 30e67ca7cabf568ef91ac974a475318ea431f9d8..3a41bb079a291eb2f1e01c886cfa70fc35cfa521 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(
--
2.4.3
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code