summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-01-06 13:58:01 +0100
committerMartin Kosek <mkosek@redhat.com>2012-01-13 21:55:32 +0100
commitfcbff4b102c47d5c8543f031baf96f9f4deb2c4e (patch)
tree0ddbe4785f3bf5dca8ae1ea8989e53ee931530dd /tests
parent415e289d0b38465bdd5d072a9a33a6fa2b649130 (diff)
downloadfreeipa.git-fcbff4b102c47d5c8543f031baf96f9f4deb2c4e.tar.gz
freeipa.git-fcbff4b102c47d5c8543f031baf96f9f4deb2c4e.tar.xz
freeipa.git-fcbff4b102c47d5c8543f031baf96f9f4deb2c4e.zip
Restore ACI when aci_mod fails
aci_mod command is composed of 2 ACI commands: aci_del which deletes the old ACI and aci_add which adds the new modified ACI. However, if aci_add command fails then both new and the old ACI are lost. Old ACI must be restored in this case. https://fedorahosted.org/freeipa/ticket/2013 https://fedorahosted.org/freeipa/ticket/2014
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xmlrpc/test_selfservice_plugin.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_selfservice_plugin.py b/tests/test_xmlrpc/test_selfservice_plugin.py
index 6a304a98..cb4b387d 100644
--- a/tests/test_xmlrpc/test_selfservice_plugin.py
+++ b/tests/test_xmlrpc/test_selfservice_plugin.py
@@ -173,6 +173,31 @@ class test_selfservice(Declarative):
dict(
+ desc='Try to update %r with empty permissions' % selfservice1,
+ command=(
+ 'selfservice_mod', [selfservice1], dict(permissions=None)
+ ),
+ expected=errors.RequirementError(name='permissions'),
+ ),
+
+
+ dict(
+ desc='Retrieve %r to verify invalid update' % selfservice1,
+ command=('selfservice_show', [selfservice1], {}),
+ expected=dict(
+ value=selfservice1,
+ summary=None,
+ result={
+ 'attrs': [u'street', u'c', u'l', u'st', u'postalcode'],
+ 'permissions': [u'read'],
+ 'selfaci': True,
+ 'aciname': selfservice1,
+ },
+ ),
+ ),
+
+
+ dict(
desc='Delete %r' % selfservice1,
command=('selfservice_del', [selfservice1], {}),
expected=dict(