summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-07-11 14:09:17 +0200
committerMartin Kosek <mkosek@redhat.com>2012-07-13 16:18:29 +0200
commit34f8ff47932c49ab3a2b19a64c84b7d3ae0b514a (patch)
treea1e3568aed9073b5cf6eaaa1385de27803af9a3f /tests
parent9d69db80a3d1fc46236a4546988176cdd7939b82 (diff)
downloadfreeipa-34f8ff47932c49ab3a2b19a64c84b7d3ae0b514a.tar.gz
freeipa-34f8ff47932c49ab3a2b19a64c84b7d3ae0b514a.tar.xz
freeipa-34f8ff47932c49ab3a2b19a64c84b7d3ae0b514a.zip
Add range-mod command
range plugin was missing range-mod command that could be used for example to fix a size for a range generated during upgrades. The range should be updated with a caution though, a misconfiguration could break trusts. iparangetype is now also handled better and filled in all commands instead of just range-show. objectclass attribute is deleted only when really needed now.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xmlrpc/test_range_plugin.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/test_xmlrpc/test_range_plugin.py b/tests/test_xmlrpc/test_range_plugin.py
index 7c95cd57a..76ffc58b7 100644
--- a/tests/test_xmlrpc/test_range_plugin.py
+++ b/tests/test_xmlrpc/test_range_plugin.py
@@ -49,7 +49,8 @@ class test_range(Declarative):
ipabaseid=[u'900000'],
ipabaserid=[u'1000'],
ipasecondarybaserid=[u'20000'],
- ipaidrangesize=[u'99999']
+ ipaidrangesize=[u'99999'],
+ iparangetype=[u'local domain range'],
),
value=testrange1,
summary=u'Added ID range "%s"' % (testrange1),
@@ -69,11 +70,29 @@ class test_range(Declarative):
ipabaserid=[u'1000'],
ipasecondarybaserid=[u'20000'],
ipaidrangesize=[u'99999'],
- iparangetype=u'local domain range',
+ iparangetype=[u'local domain range'],
),
value=testrange1,
summary=None,
),
),
+
+ dict(
+ desc='Modify range %r' % (testrange1),
+ command=('range_mod', [testrange1], dict(ipaidrangesize=90000)),
+ expected=dict(
+ result=dict(
+ cn=[testrange1],
+ ipabaseid=[u'900000'],
+ ipabaserid=[u'1000'],
+ ipasecondarybaserid=[u'20000'],
+ ipaidrangesize=[u'90000'],
+ iparangetype=[u'local domain range'],
+ ),
+ value=testrange1,
+ summary=u'Modified ID range "%s"' % (testrange1),
+ ),
+ ),
+
]